A music dancing method and device, terminal equipment and storage medium
By picking up music information to determine lighting control commands, and using the light fixture with the strongest wireless signal as the main light to control the other lights, the problem of insufficient lighting coverage is solved, and a wider range of synchronized lighting effects is achieved.
Patent Information
- Application Number
- CN202210158490.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-21
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-02-21
AI Technical Summary
In existing technologies, terminal devices can only control a single light fixture at a time, resulting in a low light coverage area when using lights to assist in music rhythm.
By picking up music information, the lighting control commands are determined, and the light fixture with the strongest wireless signal is designated as the main light. The main light controls the other lights in the target area to emit light, and synchronization is achieved using BLE GATT and WIFI BEACON technologies.
It improved the lighting coverage, enhanced the synchronization and response speed of the music rhythm, and solved the problem of insufficient lighting coverage.
Smart Images

Figure CN116113121B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of music dance, and particularly relates to a music dance method and device, a terminal device and a storage medium. BACKGROUND
[0002] With the development of society, people have higher and higher requirements for the quality of life, so that in the scene of parties, movies and the like, light is controlled to assist music in dancing to improve user experience, which is paid more and more attention to. In the prior art, a terminal device can only control a single lamp to assist music in dancing at a time, so that the light coverage range is low when light assists music in dancing. SUMMARY
[0003] The application provides a music dance method, device, terminal device and storage medium, which can solve the problem of low light coverage range when light assists music in dancing.
[0004] In a first aspect, the application provides a music dance method, comprising:
[0005] picking up first music information of a first preset time period, and determining a light control instruction according to the first music information;
[0006] detecting each lamp in a preset target area, and determining a master lamp as the lamp with the strongest wireless signal among the lamps;
[0007] sending the light control instruction to the master lamp, so that the master lamp controls slave lamps to emit light according to the light control instruction, and the slave lamps are lamps other than the master lamp in the target area.
[0008] In an embodiment, the light control instruction includes light brightness, and the determination of the light control instruction according to the first music information comprises:
[0009] determining the amplitude of at least one sample point in the first music information;
[0010] determining the light brightness of the at least one sample point according to the amplitude of the at least one sample point.
[0011] In an embodiment, the determination of the light brightness of the at least one sample point according to the amplitude of the at least one sample point comprises:
[0012] determining a first rhythm point with an amplitude greater than that of adjacent sample points from the at least one sample point, and determining a preset number of target sample points before the sampling time of the first rhythm point, the sampling time of the target sample points being closest to the sampling time of the rhythm point;
[0013] calculate a mean value of amplitudes of the preset number of target sampling points;
[0014] calculate a light brightness corresponding to the rhythm point according to the amplitude of the rhythm point and the mean value of amplitudes.
[0015] In one embodiment, the light control instruction includes a light color, and the determining the light control instruction according to the first music information includes:
[0016] determine second music information of a second preset time period according to the first music information;
[0017] determine a second rhythm point in the second music information, and determine a music feature of the second music information according to the second rhythm point;
[0018] determine a music attribute of the second music information according to the music feature, and determine a light color corresponding to the music attribute from a preset color set.
[0019] In one embodiment, the music feature includes a forte ratio, and the determining the music feature of the second music information according to the second rhythm point includes:
[0020] determine a target rhythm point with an amplitude exceeding a preset amplitude from the second rhythm point;
[0021] calculate a ratio of a number of the target rhythm points to a number of the second rhythm points, and determine the ratio as the forte ratio.
[0022] In one embodiment, the music feature includes a pitch, and the determining the music feature of the second music information according to the second rhythm point includes:
[0023] obtain a sound frequency of the second rhythm point;
[0024] calculate a mean value of the sound frequencies of the second rhythm points, and determine the mean value as the pitch.
[0025] In one embodiment, the determining the music attribute of the second music information according to the music feature includes:
[0026] obtain a first preset feature value corresponding to a first preset attribute and a second preset feature value corresponding to a second preset attribute, the light colors corresponding to the first preset attribute and the second preset attribute being different;
[0027] compare the music feature with the first preset feature value and the second preset feature value, and determine the music attribute according to a comparison result.
[0028] In a second aspect, the embodiments of the present application provide a music dancing device, comprising:
[0029] an information picking module, configured to pick first music information in a first preset time period, and determine a light control instruction according to the first music information;
[0030] a lamp detection module, configured to detect each lamp in a preset target area, and determine a master lamp as the lamp with the strongest wireless signal among the lamps;
[0031] a light control module, configured to send the light control instruction to the master lamp, so that the master lamp controls slave lamps to emit light according to the light control instruction, the slave lamps being lamps other than the master lamp in the target area.
[0032] In a third aspect, the embodiments of the present application provide a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the music dancing methods when executing the computer program.
[0033] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program implements the steps of any of the music dancing methods when executed by a processor.
[0034] In a fifth aspect, the embodiments of the present application provide a computer program product, which, when executed on a terminal device, causes the terminal device to execute any of the music dancing methods in the first aspect.
[0035] In the embodiments of the present application, first music information in a first preset time period is picked, a light control instruction is determined according to the first music information, each lamp in a preset target area is detected, a master lamp is determined as the lamp with the strongest wireless signal among the lamps, that is, the lamp closest to the user is determined, the light control instruction is sent to the master lamp, so that the master lamp controls slave lamps other than the master lamp in the target area to emit light according to the light control instruction, so that the master lamp controls the slave lamps to emit light, thereby improving the light coverage range when the light assists the music dancing. BRIEF DESCRIPTION OF DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0037] Figure 1 is a first flowchart of a music dancing method provided by an embodiment of the present application;
[0038] Figure 2 is a rhythm point diagram provided by an embodiment of the present application;
[0039] Figure 3 is a second flowchart of a music dancing method provided by an embodiment of the present application;
[0040] Figure 4 is a structure diagram of a music dancing system provided by an embodiment of the present application;
[0041] Figure 5 is a structure diagram of a music dancing device provided by an embodiment of the present application;
[0042] Figure 6 is a structure diagram of a terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
[0044] It should be understood that the term “includes” when used in the specification and the appended claims herein, specifies the presence of stated features, integers, steps, operations, elements, and / or components but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0045] It should also be understood that the term “and / or” when used in the specification and the appended claims herein, means any one and / or all possible combinations of one or more of the associated listed items.
[0046] As used in the description of the application and the appended claims herein, the term “if’ can be interpreted as meaning “when” or “upon” or “in response to a determination” or “in response to a detection” depending on the context. Similarly, the phrase “if determined” or “if detected [the described condition or event]” can be interpreted as meaning “upon a determination” or “in response to a determination” or “upon a detection of [the described condition or event]” or “in response to a detection of [the described condition or event]” depending on the context.
[0047] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0048] Figure 1 The diagram shown is a flowchart of a music rhythm method according to an embodiment of this application. The execution subject of this method can be a terminal device, such as a mobile phone, computer, or other mobile device. This embodiment uses a mobile phone as an example for illustration. Figure 1 As shown, the above-mentioned musical rhythm method may include the following steps:
[0049] Step S101: Pick up the first music information of the first preset time period, and determine the lighting control command based on the first music information.
[0050] In this embodiment, when music is required, the mobile phone can pick up music from the surrounding environment, that is, pick up the aforementioned first music information and a first preset time period. Based on the first music information, it determines the corresponding lighting control command to control the lighting of the lamps. The aforementioned first preset time period can be set according to user needs, and the lighting control command includes, but is not limited to, the brightness and color of the lamps.
[0051] In one embodiment, when the light control command in step S101 includes light brightness, determining the light control command based on the first music information may include: the mobile phone determining the amplitude of at least one sampling point in the first music information, thereby determining the light brightness of at least one sampling point based on the amplitude of the at least one sampling point. Specifically, the mobile phone may determine the amplitude of the sampling point using a Fourier transform algorithm.
[0052] In one embodiment, since there are rhythm points during music playback, determining the light brightness of at least one sampling point based on the amplitude of at least one sampling point may include: the mobile phone determining a first rhythm point from the at least one sampling point whose amplitude is greater than that of adjacent sampling points, and determining a preset number of target sampling points before the sampling time of the first rhythm point, wherein the sampling time of the target sampling points is closest to the sampling time of the rhythm point, and then calculating the average amplitude of the preset number of target sampling points, thereby calculating the light brightness corresponding to the rhythm point based on the amplitude of the rhythm point and the average amplitude. Here, the first rhythm point is at least one. In this embodiment, by judging and processing the rhythm points in the music to determine the light brightness of the lamp, the rhythmic synchronization of the music is improved.
[0053] For example, such as Figure 2 As shown, the amplitude of the Nth sample is set to D. N And its adjacent sampling point D N-1 D N+1, respectively, present D N-1 <D N , respectively, present D N >D N+1 , respectively, present D N is a beat point; further set the above-mentioned preset number as M, then at the Nth collection, the above-mentioned amplitude average Avg N is
[0054] Avg N = (D N + D N-1 + D N-2 + … + D N-M ) / (M + 1)
[0055] In an embodiment, when the above-mentioned sampling point is a non-beat point, the light of the lamp can be controlled to decrease to a preset brightness through a gradual change, which can be a low brightness state much lower than the light brightness corresponding to the beat point, or a no brightness state with brightness of 0. In addition, if there is a beat point in the above-mentioned first music information and the brightness corresponding to the beat point has been calculated, the light of the lamp can be controlled to increase to the brightness corresponding to the beat point through a gradual change.
[0056] In an embodiment, the mobile phone can respectively assign corresponding weights to the amplitude of the beat point and the amplitude average to calculate the light brightness corresponding to the beat point, for example, when the above-mentioned D N is a beat point, the specified brightness L corresponding to the beat point is:
[0057] L = K1 * D N + K2 * Avg N
[0058] Wherein, the above-mentioned K1 and the above-mentioned K2 are weight factors, which can be set according to user demand.
[0059] In an embodiment, as shown in Figure 3 , when the above-mentioned light control instruction includes light color in the above-mentioned step S101, the above-mentioned determining light control instruction according to the first music information can include:
[0060] Step S301, determining second music information of a second preset time period according to the first music information.
[0061] In the embodiment, when the above-mentioned first preset time period is greater than the above-mentioned second preset time period, the above-mentioned second music information is part of the first music information; when the above-mentioned first preset time period is less than or equal to the above-mentioned second preset time period, the above-mentioned second music information contains the first music information and the music information sampled before the first music information, so as to determine the light color through the music information of the second preset time period. Wherein, the above-mentioned second time period can be set according to user demand, for example, 10 seconds.
[0062] Step S302, determining a second rhythm point in the second music information, and determining a music feature of the second music information according to the second rhythm point.
[0063] In the embodiment, the second rhythm point is at least one, and the music feature includes but is not limited to a forte ratio, a pitch, and a tempo. The corresponding music feature is determined by the second rhythm point, so as to improve the rationality of the music feature in determining the light color.
[0064] In an embodiment, when the music feature includes the forte ratio in step S302, the music feature of the second music information according to the second rhythm point can include: the mobile phone determines a target rhythm point with an amplitude exceeding a preset amplitude from the second rhythm point, the target rhythm point is a forte part in the music, and then a ratio of a number of the target rhythm points to a number of the second rhythm points is calculated, so as to determine the ratio as the forte ratio.
[0065] In an embodiment, when the music feature includes the pitch in step S302, the music feature of the second music information according to the second rhythm point can include: the mobile phone acquires a sound frequency of the second rhythm point, and since the second rhythm point is at least one, an average of the sound frequencies of the second rhythm points is calculated, so as to determine the average as the pitch. Specifically, the mobile phone can determine the sound frequency of the second rhythm point by a Fourier transform algorithm.
[0066] In an embodiment, when the music feature includes the tempo in step S302, the music feature of the second music information according to the second rhythm point can include: the mobile phone divides the second preset time period into at least one third time period, determines a number of the second rhythm points in the third time period, determines a speed value according to the third time period and the number of the second rhythm points in the third time period, and calculates an average of the speed values corresponding to the at least one third time period, so as to determine the average as the tempo. The third time period can be set according to user demand, for example, 1 second.
[0067] Step S303, determining a music attribute of the second music information according to the music feature, and determining a light color corresponding to the music attribute from a preset color set.
[0068] In the embodiment, the music attribute and the light color corresponding to the music attribute can be stored in the color set in advance. For example, the light color corresponding to the music with the happy attribute is yellow, orange, red, etc., and is stored in the color set; the light color corresponding to the music with the sad attribute is green, blue, purple, etc., and is stored in the color set. In addition, in order to increase the performance of the light, the saturation of the light is determined as 100%.
[0069] In one embodiment, the step S303 can include: the mobile phone acquires a first preset characteristic value corresponding to a first preset attribute and a second preset characteristic value corresponding to a second preset attribute, the light color corresponding to the first preset attribute and the second preset attribute is different, and the music characteristic is compared with the first preset characteristic value and the second preset characteristic value, so as to determine the music attribute according to the comparison result.
[0070] Exemplarily, the music characteristic is set as the strong sound ratio S, the pitch H and the sound speed V, the first preset attribute is the sad attribute, and the second preset attribute is the happy attribute, the sad attribute and the happy attribute correspond to at least one typical music respectively, and the sad attribute corresponds to the strong sound ratio S A , the sound speed V A and the pitch H A , and the happy attribute corresponds to the strong sound ratio S B , the sound speed V B and the pitch H B .
[0071] A variable k with an initial value of 0 is set (the initial value is 0), the music characteristic is compared with the first preset characteristic value and the second preset characteristic value to obtain the comparison result, that is, the value of the variable k.
[0072] When the strong sound ratio S is compared with the strong sound ratio S A corresponding to the sad attribute and the strong sound ratio S B corresponding to the happy attribute:
[0073] If S A +(S B -S A ) / 3, then k is reduced by 1;
[0074] If S B -(S B -S A ) / 3, then k is increased by 1.
[0075] When the pitch H is compared with the pitch H A corresponding to the sad attribute and the pitch H B corresponding to the happy attribute:
[0076] If H A +(H B -H A ) / 3, then k is reduced by 1;
[0077] If H B -(H B -H A ) / 3, then k is increased by 1.
[0078] The sound velocity V corresponding to the sad attribute A The sound velocity V corresponding to the happy attribute B When comparison is made:
[0079] If V < V A + (V B -V A ) / 3, k is reduced by 1;
[0080] If V ≥ V B -(V B -V A ) / 3, k is increased by 1.
[0081] After the value of the variable k is obtained according to the above comparison process, the music attribute is determined according to the judgment of the value of the variable k. If k < 0, the music attribute is determined to be the sad attribute; if k ≥ 0, the music attribute is determined to be the happy attribute.
[0082] In step S102, each lamp in the preset target area is detected, and the lamp with the strongest wireless signal among the lamps is determined as the master lamp.
[0083] In this embodiment, when the music dance is performed, the mobile phone needs to detect each lamp in the target area. Since the user may hold the mobile phone and move, each lamp is detected in real time to determine the master lamp with the strongest wireless signal based on the current position of the user, that is, the lamp closest to the mobile phone, thereby improving the response speed of the lamp.
[0084] Specifically, the mobile phone can be connected with the master lamp through Bluetooth Low Energy Generic Attribute (BLE GATT).
[0085] In step S103, a light control instruction is sent to the master lamp, so that the master lamp controls the slave lamp to emit light according to the light control instruction. The slave lamp is a lamp other than the master lamp in the target area.
[0086] In this embodiment, the light control instruction is sent to the master lamp, so that the master lamp sends the instruction to the slave lamp while responding, and controls the slave lamp to emit light. Correspondingly, the slave lamp detects the light control instruction sent by the master lamp, and emits light according to the instruction.
[0087] Specifically, the slave lamp can support WIFI protocol, the master lamp forwards the light control instruction to each slave lamp in the target area through WIFI BEACON broadcast, so that the slave lamp detects the light control instruction sent by the master lamp through WIFI Sniffer technology, and executes the instruction, thereby solving the delay and packet loss problem in music and light synchronous dance through the combination of BLE GATT communication technology and WIFI BEACON communication technology. Wherein, the WIFI BEACON is a periodic frame of IEEE 802.11.
[0088] In one embodiment, as shown in Figure 4 , Figure 4 is a structural schematic diagram of a music dance system, and the audio dance is realized through the structure. Figure 4 The solid line in the music dance process represents the information flow. In addition, a wireless router can also be provided in the audio dance system, and the mobile phone can issue other control instructions to the master lamp or the slave lamp through the wireless router, as shown in the dashed line part of Figure 4 , wherein the mobile phone and the wireless router are connected through WIFI, and the wireless router and the lamp are also connected through WIFI.
[0089] In one embodiment, the mobile phone can directly send the first music information to the master lamp, and the master lamp determines the light control instruction and responds. Further, the master lamp can also broadcast the first music information to the slave lamp, and the slave lamp determines the light control instruction and responds.
[0090] In one embodiment, when the light brightness and light color of each slave lamp are different, the slave lamp number can be set in the light control instruction, and different numbers correspond to different light brightness and light color, so that the slave lamp determines the light brightness and light color corresponding to its number from the light control instruction and emits light correspondingly, so as to realize the dance of different light under the same music.
[0091] In the embodiment of the application, the first music information in the first preset time period is picked up, the light control instruction is determined according to the first music information, the wireless signal of each lamp in the preset target area is detected, the lamp with the strongest wireless signal is determined as the master lamp, that is, the lamp closest to the user is determined, and the light control instruction is sent to the master lamp, so that the master lamp controls the slave lamp except the master lamp in the target area to emit light according to the light control instruction, thereby improving the light coverage range when the light assists the music dance.
[0092] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0093] A music dancing method corresponding to the above, Figure 5 As shown in the structural schematic diagram of a music dancing device in the embodiments of the present application, such as Figure 5 As shown, the above music dancing device can include:
[0094] The information pickup module 501 is configured to pick up first music information in a first preset time period, and determine a light control instruction according to the first music information.
[0095] The lamp detection module 502 is configured to detect each lamp in a preset target area, and determine a lamp with the strongest wireless signal as a master lamp.
[0096] The light control module 503 is configured to send the light control instruction to the master lamp, so that the master lamp controls slave lamps to emit light according to the light control instruction, and the slave lamps are lamps other than the master lamp in the target area.
[0097] In one embodiment, the light control instruction includes light brightness, and the information pickup module 501 can include:
[0098] The amplitude determination sub-module is configured to determine the amplitude of at least one sampling point in the first music information.
[0099] The brightness determination sub-module is configured to determine the light brightness of at least one sampling point according to the amplitude of at least one sampling point.
[0100] In one embodiment, the brightness determination sub-module can include:
[0101] The sampling point determination unit is configured to determine a first rhythm point from at least one sampling point, the amplitude of which is greater than the amplitude of adjacent sampling points, and determine a preset number of target sampling points before the sampling time of the first rhythm point, the sampling time of the target sampling point being closest to the sampling time of the rhythm point.
[0102] The mean value calculation unit is configured to calculate the mean value of the amplitudes of the preset number of target sampling points.
[0103] The brightness calculation unit is configured to calculate the light brightness corresponding to the rhythm point according to the amplitude of the rhythm point and the mean value of the amplitudes.
[0104] In one embodiment, the light control instruction includes light color, and the information pickup module 501 can further include:
[0105] The information determining sub-module is configured to determine second music information in a second preset time period according to the first music information.
[0106] The feature determining sub-module is configured to determine a second rhythm point in the second music information, and determine a music feature of the second music information according to the second rhythm point.
[0107] The attribute determining sub-module is configured to determine a music attribute of the second music information according to the music feature, and determine a light color corresponding to the music attribute from a preset color set.
[0108] In one embodiment, the music feature includes a forte ratio, and the feature determining sub-module can include:
[0109] The rhythm point determining unit is configured to determine a target rhythm point with an amplitude exceeding a preset amplitude from the second rhythm point.
[0110] The ratio calculating unit is configured to calculate a ratio of a number of the target rhythm points to a number of the second rhythm points, and determine the ratio as the forte ratio.
[0111] In one embodiment, the music feature includes a pitch, and the feature determining sub-module can further include:
[0112] The frequency obtaining unit is configured to obtain a sound frequency of the second rhythm point.
[0113] The pitch determining unit is configured to calculate a mean value of the sound frequency of the second rhythm point, and determine the mean value as the pitch.
[0114] In one embodiment, the attribute determining sub-module can include:
[0115] The feature value obtaining unit is configured to obtain a first preset feature value corresponding to a first preset attribute and a second preset feature value corresponding to a second preset attribute, and the light color corresponding to the first preset attribute and the second preset attribute is different.
[0116] The comparing unit is configured to compare the music feature with the first preset feature value and the second preset feature value, and determine the music attribute according to a comparison result.
[0117] In the embodiments of the present application, first music information in a first preset time period is picked up, a light control instruction is determined according to the first music information, each lamp in a preset target area is detected, a lamp with the strongest wireless signal in the lamps is determined as a master lamp, that is, a lamp closest to a user is determined, and the light control instruction is sent to the master lamp, so that the master lamp controls slave lamps in the target area to emit light according to the light control instruction, thereby improving the light coverage when the light assists the music in dancing.
[0118] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing system embodiments and method embodiments, and will not be repeated here.
[0119] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0120] like Figure 6 As shown, the terminal device 6 in this embodiment includes: at least one processor 600 ( Figure 6 (Only one is shown in the image), a memory 601 connected to the processor 600, and a computer program 602 stored in the memory 601 and executable on at least one processor 600, such as a music rhythm program. When the processor 600 executes the computer program 602, it implements the steps in the various music rhythm method embodiments described above, for example... Figure 1 The steps S101 to S103 are shown. Alternatively, when the processor 600 executes the computer program 602, it implements the functions of each module in the above-described device embodiments, for example... Figure 5 The functions of modules 501 to 503 are shown.
[0121] For example, the computer program 602 described above can be divided into one or more modules. One or more of these modules are stored in the memory 601 and executed by the processor 600 to complete this application. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 602 in the terminal device 6. For example, the computer program 602 can be divided into an information acquisition module 501, a lighting detection module 502, and a lighting control module 503, with the specific functions of each module as follows:
[0122] The information acquisition module 501 is used to acquire first music information for a first preset time period and determine the lighting control command based on the first music information.
[0123] The lighting detection module 502 is used to detect each lighting fixture in a preset target area and identify the lighting fixture with the strongest wireless signal as the main lighting fixture.
[0124] The lighting control module 503 is used to send lighting control commands to the main light so that the main light controls the slave lights to emit light according to the lighting control commands. The slave lights are the lamps other than the main light in the target area.
[0125] The terminal device 6 can include, but is not limited to, a processor 600, a memory 601. Those skilled in the art can understand that Figure 6 The terminal device 6 is only an example and is not limited to the terminal device 6, and can include more or less components than shown, or combine certain components, or different components, for example, can also include an input / output device, a network access device, a bus, etc.
[0126] The processor 600 can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or can also be any conventional processor.
[0127] The memory 601 can be an internal storage unit of the terminal device 6 in some embodiments, for example, a hard disk or a memory of the terminal device 6. The memory 601 can also be an external storage device of the terminal device 6 in other embodiments, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 601 can include both the internal storage unit and the external storage device of the terminal device 6. The memory 601 is used to store an operating system, an application program, a boot loader, data, and other programs, for example, program codes of the computer program, etc. The memory 601 can also be used to temporarily store data that has been output or will be output.
[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is taken as an example, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the above device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here. In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in a certain embodiment can be referred to the related description of other embodiments.
[0129] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0130] In the embodiments provided in the present application, it should be understood that the disclosed apparatus / terminal device and method can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are only schematic, for example, the division of the above modules or units is only a logical function division, and there can be another division way in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0131] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0132] The integrated units described above, if implemented in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the above-mentioned computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the photographing device / terminal equipment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium can not be an electrical carrier signal and a telecommunication signal.
[0133] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method of musical locomotion, characterized by, The method comprises the steps of: picking up first music information in a first preset time period, and determining a light control instruction according to the first music information; detecting each lamp in a preset target area, determining a lamp with the strongest wireless signal based on a current position of a user, and determining the lamp with the strongest wireless signal as a master lamp; sending the light control instruction to the master lamp, so that the master lamp controls slave lamps to emit light according to the light control instruction, the slave lamps being lamps other than the master lamp in the target area.
2. The method of Claim 1, wherein, The light control instruction comprises light brightness, and the step of determining the light control instruction according to the first music information comprises: determining the amplitude of at least one sample point in the first music information; determining the light brightness of the at least one sample point according to the amplitude of the at least one sample point.
3. The method of Claim 2, wherein, The step of determining the light brightness of the at least one sample point according to the amplitude of the at least one sample point comprises: determining a first rhythm point with an amplitude greater than that of adjacent sample points from the at least one sample point, determining a preset number of target sample points before the sampling time of the first rhythm point, and the sampling time of the target sample point being closest to the sampling time of the rhythm point; calculating the average amplitude of the preset number of target sample points; calculating the light brightness corresponding to the rhythm point according to the amplitude of the rhythm point and the average amplitude.
4. The method of music locomotion according to any one of claims 1 to 3, wherein, The light control instruction comprises light color, and the step of determining the light control instruction according to the first music information comprises: determining second music information in a second preset time period according to the first music information; determining a second rhythm point in the second music information, and determining a music feature of the second music information according to the second rhythm point; determining a music attribute of the second music information according to the music feature, and determining a light color corresponding to the music attribute from a preset color set.
5. The method of Claim 4, wherein, The music feature comprises a forte ratio, and the step of determining the music feature of the second music information according to the second rhythm point comprises: determining a target rhythm point with an amplitude exceeding a preset amplitude from the second rhythm point; calculating the ratio of the number of target rhythm points to the number of second rhythm points, and determining the ratio as the forte ratio.
6. The method for moving to music of claim 4, wherein, The music feature comprises a pitch, and the step of determining the music feature of the second music information according to the second rhythm point comprises: obtaining the sound frequency of the second rhythm point; calculating the average of the sound frequencies of the second rhythm points, and determining the average as the pitch.
7. The method of Claim 4, wherein, The step of determining the music attribute of the second music information according to the music feature comprises: obtaining a first preset feature value corresponding to a first preset attribute and a second preset feature value corresponding to a second preset attribute, the light colors corresponding to the first preset attribute and the second preset attribute being different; comparing the music feature with the first preset feature value and the second preset feature value, and determining the music attribute according to the comparison result.
8. A musical motion device characterized by, The method comprises the steps of: an information picking-up module, configured to pick up first music information in a first preset time period, and determine a light control instruction according to the first music information; The lamp detection module is configured to detect each lamp in a preset target area, determine a lamp with the strongest wireless signal based on a current location of a user, and determine the lamp with the strongest wireless signal as a master lamp. The light control module is configured to send the light control instruction to the master lamp, so that the master lamp controls slave lamps to emit light according to the light control instruction, and the slave lamps are lamps other than the master lamp in the target area.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the steps of the music dancing method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the steps of the music dancing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Light control method, device and equipment for automatically identifying music and storage medium
CN109640465A
Loudspeaker for closed and open environments
WO2016098068A1