Music playing apparatus and music playing method

By constructing a two-dimensional rectangular coordinate system, automatically obtaining the emotional tone of the music and adjusting the light, the problem of inefficient manual labeling is solved, and an efficient emotional atmosphere is created in which the music and light are synchronously matched.

CN120452399APending Publication Date: 2025-08-08SHENZHEN XINYANG CHUANGZHI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410175905.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-07
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Obtaining the emotional tone of music in the prior art requires manual listening to be time-consuming and labor-intensive and inefficient.

Method used

By obtaining the beat and mode of the target music, a two-dimensional rectangular coordinate system is constructed, combined with the sample data set, the emotional tone of the music is automatically determined, and a light control command is sent to adjust the color temperature and brightness of the lamp.

Benefits of technology

It realizes the automatic acquisition of the emotional tone of the music, improves efficiency, and can simultaneously adjust the lighting atmosphere and match the emotional tone of the music when playing the music, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120452399A_ABST
    Figure CN120452399A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides music playing equipment and a music playing method, and relates to the technical field of audio playing. The music playing device comprises: a controller configured to obtain a beat and a mode of a target music, obtain a corresponding target position of the target music in a two-dimensional rectangular coordinate system constructed by the beat and the mode according to the beat and the mode of the target music, and obtain a target area corresponding to the target music according to the target position and a preset radius, according to the target area and the distribution of each piece of sample music in the sample data set in the two-dimensional rectangular coordinate system, obtaining an emotion basic tone of the target music, and obtaining a light control instruction corresponding to the target music according to the emotion basic tone of the target music; an audio output interface configured to: play a target music; the communicator is configured to send a light control instruction to at least one lamp in the area where the music playing device is located when the target music is played. Some embodiments of the invention are used for music playing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Some embodiments of the present application relate to the field of audio playback technology, and more specifically, to a music playback device and a music playback method. Background Art

[0002] Music is an art form primarily based on sound, typically encompassing elements such as melody, harmony, rhythm, mode, and timbre. Because it can enhance atmosphere, express emotions, and cultivate sentiment, music plays a vital role in people's lives.

[0003] Generally speaking, a piece of music has a main melody, which is the emotional tone of the music. Accurately obtaining the emotional tone of the music helps people resonate more deeply with the music, thereby better regulating emotions or creating scenes. The method of determining the emotional tone of a piece of music in the related art is: a professionally trained person listens to the music and marks the emotional tone of the music according to subjective feelings, and determines the emotional tone of the music according to the marked results when the music is played. However, this method of obtaining the emotional tone of the music requires a professionally trained person to listen to all the music in the media resource server one by one, which is time-consuming, labor-intensive, and inefficient. Summary of the Invention

[0004] The exemplary embodiments of the present application provide a music playing device and a music playing method for improving the efficiency of acquiring the emotional tone of a music.

[0005] Some embodiments of the present application provide the following technical solutions:

[0006] In a first aspect, some embodiments of the present application provide a music playing device, comprising:

[0007] The controller is configured to: obtain the beat and mode of the target music;

[0008] Obtaining, according to the beat and mode of the target music, a target position corresponding to the target music in a two-dimensional rectangular coordinate system constructed based on the beat and mode;

[0009] Acquire a target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and a preset radius;

[0010] Obtaining the emotional tone of the target music piece based on the target area and the distribution of each sample music piece in the sample data set in the two-dimensional rectangular coordinate system; wherein the sample data set includes a plurality of sample music pieces and the emotional tone of each sample music piece;

[0011] Obtaining a lighting control instruction corresponding to the target music according to the emotional tone of the target music;

[0012] The audio output interface is configured to: play the target music;

[0013] The communicator is configured to: when playing the target music, send the lighting control instruction to at least one lamp in the area where the music playing device is located, so as to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instruction.

[0014] In a second aspect, some embodiments of the present application provide a music playing method, comprising:

[0015] Obtain the beat and mode of the target music;

[0016] Obtaining a target position corresponding to the target music in a two-dimensional rectangular coordinate system constructed based on the beat and mode of the target music according to the beat and mode of the target music;

[0017] Acquire a target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and a preset radius;

[0018] Obtaining the emotional tone of the target music piece based on the target area and the distribution of each sample music piece in the sample data set in the two-dimensional rectangular coordinate system; wherein the sample data set includes a plurality of sample music pieces and the emotional tone of each sample music piece;

[0019] Obtaining a lighting control instruction corresponding to the target music according to the emotional tone of the target music;

[0020] When the target music is played, the lighting control instruction is sent to at least one lamp in the area where the music playing device is located, so as to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instruction.

[0021] In a third aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computing device, the computing device implements the music playing method described in the second aspect.

[0022] In a fourth aspect, some embodiments of the present application provide a computer program product, which, when executed on a computer, enables the computer to implement the music playing method described in the second aspect.

[0023] As can be seen from the above technical solutions, the music playing device and music playing method provided by some embodiments of the present application first obtain the beat and mode of the target music, and obtain the target position corresponding to the target music in the two-dimensional rectangular coordinate system constructed with the beat and mode according to the beat and mode of the target music, and obtain the target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and the preset radius, and then obtain the emotional tone of the target music according to the target area and the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system, and obtain the corresponding lighting control instruction of the target music according to the emotional tone of the target music, and when playing the target music, send the lighting control instruction to at least one lamp in the area where the music playing device is located to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instruction. Compared with manually marking the emotional tone of the music, since some embodiments of the present application can automatically obtain the emotional tone of the music, some embodiments of the present application can improve the efficiency of obtaining the emotional tone of the music. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the implementation methods of some embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0025] Figure 1 shows an architectural diagram of a music playing scenario in some embodiments;

[0026] Figure 2 shows a hardware configuration block diagram of a control device in some embodiments;

[0027] Figure 3 A hardware configuration block diagram of a music playing device in some embodiments is shown;

[0028] Figure 4 A software configuration block diagram of a music playing device in some embodiments is shown;

[0029] Figure 5 A flowchart showing the steps of a music playing method in some embodiments is shown;

[0030] Figure 6 A schematic diagram showing target positions corresponding to target music in some embodiments;

[0031] Figure 7 A schematic diagram showing target areas corresponding to target music in some embodiments;

[0032] Figure 8 A flowchart showing the steps of a music playing method in other embodiments is shown;

[0033] Figure 9 A schematic diagram showing conversion of a time domain signal into a frequency domain signal in some embodiments is shown;

[0034] Figure 10 A schematic diagram showing conversion of a frequency domain signal into a differential signal in some embodiments is shown;

[0035] Figure 11 A schematic diagram showing areas corresponding to emotional tones in some embodiments;

[0036] Figure 12 A schematic diagram showing the overlap of the region corresponding to the emotional tone and the target region in some embodiments;

[0037] Figure 13 A schematic diagram showing a first threshold distance corresponding to an emotional tone in some embodiments;

[0038] Figure 14 A flowchart showing the steps of a music playing method in other embodiments is shown;

[0039] Figure 15 A schematic diagram illustrating a second threshold distance corresponding to an emotional tone in some embodiments is shown. DETAILED DESCRIPTION

[0040] In order to make the purpose and implementation of this application clearer, the exemplary implementation of this application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only part of the embodiments of this application, not all of the embodiments.

[0041] It should be noted that the brief descriptions of terms in this application are only for the purpose of facilitating the understanding of the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and usual meanings.

[0042] In the specification and claims of this application and the accompanying drawings, the terms "first," "second," "third," etc. are used to distinguish similar or similar objects or entities, and are not necessarily intended to limit a particular order or sequence, unless otherwise noted. It should be understood that the terms used in this manner are interchangeable under appropriate circumstances.

[0043] The terms "comprise," "include," and "have," and any variations thereof, are intended to cover but not exclude inclusion; for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0044] Figure 1 A schematic diagram of the scenario architecture of the content distribution method provided in some embodiments of the present application.

[0045] like Figure 1 As shown, in some embodiments, the scene architecture provided by some embodiments of the present application may include: a music playing device 200.

[0046] The music playing device 200 provided in the embodiment of the present application can have various implementation forms, for example, it can be a smart speaker, a refrigerator, a television, a washing machine, an air conditioner, a car-mounted device, a smart curtain, a router, a set-top box, a mobile phone, a personal computer (PC), a smart TV, a laser projection device, a monitor, an electronic whiteboard (electronic bulletin board), an electronic table (electronic table), etc.

[0047] In some embodiments, the scene architecture provided by some embodiments of the present application may further include: a lamp 500 .

[0048] Unlike indicator lights or ambient lights integrated into the music player 200, the lamp 500 in the embodiment of the present application is a smart home lamp independent of the music player 200. Communication between the music player 200 and the lamp 500 can include infrared protocol communication, Bluetooth protocol communication, or other short-range communication methods.

[0049] In some embodiments, the scene architecture provided by some embodiments of the present application may further include: a control device 100 and / or a smart device 300. A user may operate the music playing device 200 via the smart device 300 and / or the control device 100.

[0050] In some embodiments, the control device 100 may be a remote controller. Communication between the remote controller and the music playing device may include infrared protocol communication, Bluetooth protocol communication, or other short-range communication methods, thereby controlling the music playing device 200 wirelessly or wiredly. The user may control the music playing device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, and the like.

[0051] In some embodiments, a smart device 300 (such as a mobile terminal, tablet computer, computer, laptop computer, etc.) can also be used to control the music playing device 200. For example, the music playing device 200 is controlled by an application running on the smart device.

[0052] In some embodiments, the music playing device 200 may not use the above-mentioned control device 100 or smart device 300 to receive instructions, but instead receive user control through physical buttons, touch or gestures.

[0053] In some embodiments, the music playing device 200 can also be controlled in ways other than the control device 100 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the music playing device 200, or the user's voice command control can be received through a voice control device set outside the music playing device 200.

[0054] In some embodiments, the scenario architecture provided by some embodiments of the present application may further include: a content server 400. The music playing device 200 may also communicate data with the content server 400 via a local area network (LAN) or a wireless local area network (WLAN) to obtain media resources from the content server 400. In some embodiments of the present application, the media resources may be video files or audio files. The content server 400 may provide various content and interactions to the music playing device 200. The content server 400 may be a cluster or multiple clusters, and may include one or more types of servers.

[0055] In some embodiments, the music playing device 200 can also obtain the emotional tone of the music to be played, and obtain the lighting control instructions corresponding to the music to be played based on the emotional tone of the music to be played, and when playing the music to be played, send the lighting control instructions corresponding to the music to be played to the lamp 500 to control the lamp 500 to adjust the color temperature and / or brightness according to the lighting control instructions corresponding to the music to be played, thereby matching the lighting atmosphere with the emotional tone of the music to be played and enhancing the user experience.

[0056] Figure 2 An example is shown Figure 1 FIG. 1 is a block diagram of a configuration of the control device 100 in the embodiment shown. Figure 2 As shown, the control device 100 includes a controller 110, a memory 120, a communication interface 130, a user input / output interface 140, and a power supply. The control device 100 can receive user input commands and convert the commands into commands that the music playback device 200 can recognize and respond to, acting as an intermediary for interaction between the user and the music playback device 200.

[0057] Figure 3 An example is shown Figure 1 FIG. 2 is a block diagram showing the configuration of the music playing device 200 in the embodiment shown in FIG. Figure 3 As shown, the music playing device 200 includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.

[0058] In some embodiments, the controller 250 includes: a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM Random Access Memory (RAM), ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus (Bus), etc.

[0059] The display 260 includes a display screen component for presenting images, and a driving component for driving image display, a component for receiving image signals output from a controller, and a component for displaying video content, image content, and a menu control interface and a user control UI interface.

[0060] The display 260 may be a liquid crystal display, an organic light emitting diode (OLED) display, a projection display, or the like.

[0061] The communicator 220 is a component used to communicate with external devices or servers using various communication protocols. For example, the communicator may include at least one of a Wi-Fi module, a Bluetooth module, a wired Ethernet module, or other network communication protocol chip, a near-field communication protocol chip, and an infrared receiver. The music playback device 200 can use the communicator 220 to send and receive control signals and data signals with the control device 100 or the server 400.

[0062] The user interface may be used to receive control signals input by the user through the control device 100 (eg, an infrared remote controller, etc.) or through touch or gestures.

[0063] Detector 230 is used to collect signals from the external environment or external interactions. For example, detector 230 includes a light receiver, a sensor for collecting ambient light intensity; or detector 230 includes an image collector, such as a camera, for collecting external environmental scenes, user attributes, or user interaction gestures; or detector 230 includes a sound collector, such as a microphone, for receiving external sounds.

[0064] The external device interface 240 may include, but is not limited to, any one or more of the following: a High-Definition Multimedia Interface (HDMI), an analog or digital high-definition component input interface (component), a composite video broadcast signal (CVBS), a Universal Serial Bus (USB), an RGB (Red, Green, Blue) port, or the like. A composite input / output interface comprising multiple of the aforementioned interfaces may also be employed.

[0065] The tuner / demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals. In some embodiments, the controller 250 and the tuner / demodulator 210 may be located in different separate devices, that is, the tuner / demodulator 210 may also be located in an external device to the main device where the controller 250 is located, such as an external set-top box.

[0066] Controller 250 controls the operation of the display device and responds to user operations using various software control programs stored in memory. Controller 250 controls the overall operation of music playback device 200. For example, in response to receiving a user command to select a UI object for display on display 260, controller 250 may perform operations related to the object selected by the user command.

[0067] In some embodiments, the controller 250 includes: a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM Random Access Memory (RAM), ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus (Bus), etc.

[0068] In some embodiments, the controller 250 is also configured to obtain lighting control instructions corresponding to the target music; and when the target music is played on the audio output interface, the lighting control instructions are sent to at least one lamp in the area where the music playing device is located to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instructions.

[0069] In some embodiments, the controller 250 obtains the lighting control instructions corresponding to the target music in the following manner: obtaining the beat and mode of the target music, obtaining the target position corresponding to the target music in a two-dimensional rectangular coordinate system constructed with the beat and mode according to the beat and mode of the target music, obtaining the target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and a preset radius, obtaining the emotional tone of the target music according to the target area and the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system, and obtaining the corresponding lighting control instructions of the target music according to the emotional tone of the target music.

[0070] In some embodiments, the controller 250 is configured to obtain the beat and mode of the target music in the following manner: performing Fourier transform on the time domain signal corresponding to the target music to obtain the frequency domain signal corresponding to the target music; obtaining the peak information of the frequency domain signal corresponding to the target music; determining the mode of the target music based on the frequency corresponding to each peak in the peak information; and calculating the number of peaks per unit time based on the peak information to obtain the beat of the target music.

[0071] In some embodiments, the controller 250 is configured to obtain the peak information of the frequency domain signal corresponding to the target music in the following manner: performing differential processing on the frequency domain signal corresponding to the target music to obtain the differential signal corresponding to the target music; performing peak detection on the differential signal to obtain the peak information of the frequency domain signal corresponding to the target music.

[0072] In some embodiments, the controller 250 obtains the emotional tone of the target music based on the target area and the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system, and the implementation method includes: determining the area corresponding to each emotional tone in the two-dimensional rectangular coordinate system according to the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system and the emotional tone of each sample music; obtaining the overlapping area between the target area and the area corresponding to each emotional tone; and determining the emotional tone corresponding to the area with the largest overlapping area as the emotional tone of the target music.

[0073] In some embodiments, the controller 250 obtains the emotional tone of the target music based on the target area and the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system, and the implementation method includes: determining the sample music located in the target area at the corresponding position based on the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system; determining the number of sample music corresponding to each emotional tone in the sample music located in the target area; and determining the emotional tone with the largest number of corresponding sample music as the emotional tone of the target music.

[0074] In some embodiments, the controller 250 is further configured to obtain the preset radius. The controller 250 obtains the preset radius in the following manner: determining the region corresponding to each emotional tone in the two-dimensional rectangular coordinate system based on the distribution of each sample music piece in the sample data set in the two-dimensional rectangular coordinate system and the emotional tone of each sample music piece; obtaining a first threshold distance corresponding to each emotional tone based on the region corresponding to each emotional tone; the first threshold distance corresponding to any emotional tone being the minimum distance from the geometric center of the region corresponding to the emotional tone to the boundary of the region corresponding to the emotional tone; and determining the minimum value of the first threshold distances corresponding to each emotional tone as the preset radius.

[0075] In other embodiments, the controller 250 obtains the preset radius in the following ways: determining the center position corresponding to each emotional tone in the two-dimensional rectangular coordinate system according to the beat range and mode range corresponding to each emotional tone; obtaining the second threshold distance corresponding to each emotional tone according to the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system and the emotional tone of each sample music, the second threshold distance corresponding to any emotional tone being the maximum radius of the emotional tone of each sample music within the circular area covered by the emotional tone with the center position corresponding to the emotional tone as the center of the circle, and determining the minimum value of the second threshold distance corresponding to each emotional tone as the preset radius.

[0076] In some embodiments, the controller 250 acquires the lighting control instructions corresponding to the target music piece based on the emotional tone of the target music piece by: acquiring the lighting control instructions corresponding to the target music piece based on the emotional tone of the target music piece and a preset mapping relationship; wherein the preset mapping relationship includes lighting control instructions corresponding to each emotional tone. In other words, a mapping relationship between emotional tones and lighting control instructions is pre-established, and the mapping relationship is searched based on the emotional tone of the target music piece to acquire the lighting control instructions corresponding to the target music piece.

[0077] In some embodiments, the controller 250 sends the light control instruction to the at least one lamp by converting the light control instruction into a corresponding remote control signal and sending the remote control signal to the at least one lamp.

[0078] The user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user interface receives the user input command through the GUI. Alternatively, the user may input a user command through a specific voice or gesture, and the user interface may recognize the voice or gesture through a sensor to receive the user input command.

[0079] A user interface is the medium for interaction and information exchange between an application or operating system and the user. It converts information between its internal form and a user-friendly format. A common user interface is the graphical user interface (GUI), which refers to a graphical user interface related to computer operations. It can be an icon, window, control, or other interface element displayed on an electronic device's display. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0080] See also Figure 4 In some embodiments, the operating system of the music playing device is divided into four layers, namely, from top to bottom, the application layer (referred to as "application layer") 41, the application framework layer (referred to as "framework layer") 42, the Android runtime (Android runtime) and system library layer (referred to as "system runtime library layer") 43, and the kernel layer 44.

[0081] In some embodiments, at least one application runs in the application layer 41. These applications can be window programs, system settings programs, clock programs, etc. that come with the operating system, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.

[0082] The application framework layer 42 provides applications with an application programming interface (API) and programming framework. The application framework layer includes predefined functions. The application framework layer acts as a processing center, determining the actions taken by applications in the application layer. Applications use the API to access system resources and services during execution.

[0083] like Figure 4As shown, in some embodiments of the present application, the application framework layer 42 includes managers, content providers, etc., wherein the manager includes at least one of the following modules: an activity manager for interacting with all activities running in the system; a location manager for providing system services or applications with access to system location services; a package manager for retrieving various information related to applications currently installed on the device; a notification manager for controlling the display and clearing of notification messages; and a window manager for managing icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.

[0084] Some embodiments of the present application also provide a music playing method, referring to Figure 5 As shown, the music playing method includes the following steps:

[0085] S51. Obtain the tempo and mode of the target music.

[0086] In some embodiments of the present application, the target music may be any form of music, for example, pure music played solely by instruments, songs that combine lyrics and music, or operas that combine elements of dramatic performance, singing, music, dance, and dialogue.

[0087] In some embodiments of the present application, the beat of a piece of music refers to the combination pattern of strong beats and weak beats of the music, which can be specifically the number of strong beats per unit time; the mode of a piece of music refers to the vibration frequency of the sound of the music.

[0088] In some embodiments, the tempo of a piece of music can be divided into three categories based on the number of beats per minute: fast, medium, and slow. For example, a piece of music with more than 120 beats per minute is considered fast, a piece of music with less than 120 beats per minute and more than 60 beats per minute is considered medium, and a piece of music with less than 60 beats per minute is considered slow.

[0089] In some embodiments, the modes of music can be divided into three categories based on the vibration frequency: major, medium, and minor. For example, when the vibration frequency is less than 500 Hz, it is a major key; when the vibration frequency is greater than 500 Hz and less than 1000 Hz, it is a medium key; and when the vibration frequency is greater than 1000 Hz, it is a minor key.

[0090] S52: Obtain, according to the beat and mode of the target music, a target position corresponding to the target music in a two-dimensional rectangular coordinate system constructed based on the beat and mode.

[0091] For example, refer to Figure 6 As shown, Figure 6 The above steps are described by taking a two-dimensional rectangular coordinate system with beat as the horizontal axis and mode as the vertical axis, and the beat gradually increases along the horizontal axis and the mode gradually decreases along the vertical axis as an example. Figure 6 As shown, when the tempo of the target music is 70 beats / minute and the mode of the target music is 750 Hz, the corresponding target position in the two-dimensional rectangular coordinate system constructed by the tempo and mode can be determined to be point a.

[0092] S53: Acquire a target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and the preset radius.

[0093] That is, in a two-dimensional rectangular coordinate system constructed with beats and modes, a circle is drawn with the target position as the center and the preset radius as the radius, and the resulting circular area is the target area corresponding to the target music.

[0094] For example, refer to Figure 7 As shown, in Figure 6 Based on the example shown, when the preset radius is r, it can be determined that the target area corresponding to the target music is a circular area 700 .

[0095] S54 , obtaining the emotional tone of the target music according to the target area and the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system.

[0096] The sample data set includes a plurality of sample music pieces and the emotional tone of each sample music piece.

[0097] In some embodiments, the emotional tone of the music in some embodiments of the present application may include: excitement, calmness, and depression.

[0098] S55. Obtain a lighting control instruction corresponding to the target music according to the emotional tone of the target music.

[0099] In some embodiments, obtaining the corresponding lighting control instruction of the target music according to the emotional tone of the target music includes: obtaining the corresponding lighting control instruction of the target music according to the emotional tone of the target music and a preset mapping relationship.

[0100] The preset mapping relationship includes lighting control instructions corresponding to each emotional tone.

[0101] That is, a mapping relationship including lighting control instructions corresponding to various emotional tones is pre-established, and the mapping relationship is searched through the emotional tones of the target music to obtain the lighting control instructions corresponding to the target music.

[0102] For example, the preset mapping relationship may be as shown in Table 1 below:

[0103] Table 1

[0104] emotional tone Excited calm low Lighting control instructions Instruction 1 Instruction 2 Instruction 3 brightness 120% 45% 20% Color temperature 3500K 5000K 7500K

[0105] S56. When playing the target music, send the lighting control instruction to at least one lamp in the area where the music playing device is located, so as to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instruction.

[0106] Some embodiments of the present application provide a music playing method, which first obtains the beat and mode of the target music, and obtains the target position corresponding to the target music in a two-dimensional rectangular coordinate system constructed with the beat and mode according to the beat and mode of the target music, and obtains the target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and a preset radius, and then obtains the emotional tone of the target music according to the target area and the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system, and obtains the corresponding lighting control instruction of the target music according to the emotional tone of the target music, and when playing the target music, sends the lighting control instruction to at least one lamp in the area where the music playing device is located, so as to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instruction. Compared with manually marking the emotional tone of the music, since some embodiments of the present application can automatically obtain the emotional tone of the music, some embodiments of the present application can improve the efficiency of obtaining the emotional tone of the music.

[0107] As a pair Figure 1 As an extension and refinement of the embodiment shown, some embodiments of the present application also provide another music playing method, referring to Figure 8 As shown, the music playing method includes the following steps:

[0108] S801. Perform Fourier transform on a time domain signal corresponding to the target music to obtain a frequency domain signal corresponding to the target music.

[0109] The original signal of the music is a time domain signal, which is difficult to quantify, analyze and process. Therefore, some embodiments of the present application first perform Fourier transform on the time domain signal corresponding to the target music to obtain the frequency domain signal corresponding to the target music.

[0110] For example, refer to Figure 9 As shown, the time domain signal 91 corresponding to the target music is subjected to Fourier transform to obtain the frequency domain signal 92 corresponding to the target music.

[0111] S802: Obtain peak information of the frequency domain signal corresponding to the target music.

[0112] In some embodiments, the method for obtaining the peak information of the frequency domain signal corresponding to the target music includes the following steps a and b:

[0113] Step a: performing differential processing on the frequency domain signal corresponding to the target music to obtain a differential signal corresponding to the target music.

[0114] In some embodiments, performing differential processing on the frequency domain signal corresponding to the target music includes performing first-order differential processing on the frequency domain signal corresponding to the target music, that is, subtracting the amplitude corresponding to each frequency from the amplitude corresponding to the previous frequency to obtain a differential signal corresponding to the target music.

[0115] For example, refer to Figure 10 As shown, the frequency domain signal 92 corresponding to the target music is subjected to differential processing to obtain the differential signal 93 corresponding to the target music.

[0116] Differential processing of the frequency domain signal corresponding to the target music can remove the noise in the frequency domain signal corresponding to the target music and strengthen the peak frequency, so that the audio information is enhanced and the noise is reduced, which is more conducive to accurate data analysis.

[0117] Step b: performing peak detection on the differential signal to obtain peak information of the frequency domain signal corresponding to the target music.

[0118] S803: Determine the mode of the target music according to the frequencies corresponding to the peak values in the peak information.

[0119] S804: Calculate the number of peaks per unit time according to the peak information to obtain the tempo of the target music.

[0120] In some embodiments, the time information in the time domain information may be added to the peak information to calculate the number of peaks per unit time.

[0121] S805 . Obtain, according to the beat and mode of the target music, a target position corresponding to the target music in a two-dimensional rectangular coordinate system constructed based on the beat and mode.

[0122] S806: Acquire a target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and the preset radius.

[0123] S807 : Determine a region corresponding to each emotional tone in the two-dimensional rectangular coordinate system according to the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system and the emotional tone of each sample music.

[0124] The sample data set includes a plurality of sample music pieces and the emotional tone of each sample music piece.

[0125] In some embodiments, based on the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system and the emotional tone of each sample music, the area corresponding to each emotional tone in the two-dimensional rectangular coordinate system is determined, including: obtaining the beat and mode of each sample music, obtaining the corresponding position of each sample music in the two-dimensional rectangular coordinate system according to the beat and mode of each sample music, performing boundary fitting on the corresponding position of the sample music with the same emotional tone according to the emotional tone of each sample music, and thereby determining the area corresponding to each emotional tone in the two-dimensional rectangular coordinate system in combination with the sound wave frequency range (20Hz~20000Hz) that can be perceived by the human ear.

[0126] For example, refer to Figure 11 As shown, Figure 11 In the example, the emotional tones include excitement, calmness, and depression. According to the distribution of the sample music with the emotional tones of excitement, calmness, and depression in the two-dimensional rectangular coordinate system, the regions corresponding to the emotional tones can be determined as follows: Figure 11 As shown, the area corresponding to [excited] is area 111 , the area corresponding to [calm] is area 112 , and the area corresponding to [depressed] is area 113 .

[0127] S808: Obtain overlapping areas between the target area and areas corresponding to respective emotional tones, and determine the emotional tone corresponding to the area with the largest overlapping area as the emotional tone of the target music.

[0128] For example, refer to Figure 12 As shown, the overlapping area between the area 113 corresponding to [Excited] and the target area 700 is larger than the overlapping area between the area 112 corresponding to [Calm] and the target area 700, and the overlapping area between the area 112 corresponding to [Calm] and the target area 700 is larger than the overlapping area between the area 112 corresponding to [Depressed] and the target area 700. Therefore, it can be determined that the emotional tone of the target music is [Excited].

[0129] S809: Acquire a lighting control instruction corresponding to the target music according to the emotional tone of the target music.

[0130] S810: When playing the target music, send the lighting control instruction to at least one lamp in the area where the music playing device is located, so as to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instruction.

[0131] In the above embodiment, it is necessary to obtain the target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and the preset radius. Therefore, some embodiments of the present application further provide the following implementation method for determining the preset radius:

[0132] Step 1: Determine the region corresponding to each emotional tone in the two-dimensional rectangular coordinate system according to the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system and the emotional tone of each sample music.

[0133] The area corresponding to each emotional tone in the two-dimensional rectangular coordinate system can be Figure 11 To avoid redundancy, detailed description is omitted here.

[0134] Step 2: According to the area corresponding to each emotional tone, obtain the first threshold distance corresponding to each emotional tone.

[0135] The first threshold distance corresponding to any emotional tone is the minimum distance from the geometric center of the region corresponding to the emotional tone to the boundary of the region corresponding to the emotional tone.

[0136] Step 3: Determine the minimum value of the first threshold distances corresponding to the various emotional tones as the preset radius.

[0137] For example, refer to Figure 13 As shown, the geometric center of area 111 corresponding to [Excited] is point b, the geometric center of area 112 corresponding to [Calm] is point c, and the geometric center of area 113 corresponding to [Depressed] is point d. The minimum distance from point b to the boundary of area 111 is L1, the minimum distance from point c to the boundary of area 112 is L2, and the minimum distance from point d to the boundary of area 113 is L3, and L1>L2>L3, so the preset radius can be determined to be L3.

[0138] As a pair Figure 1 As an extension and refinement of the embodiment shown, some embodiments of the present application also provide another music playing method, referring to Figure 14 As shown, the music playing method includes the following steps:

[0139] S141. Perform Fourier transform on the time domain signal corresponding to the target music to obtain the frequency domain signal corresponding to the target music.

[0140] S142: Obtain peak information of the frequency domain signal corresponding to the target music.

[0141] S143: Determine the mode of the target music according to the frequencies corresponding to the peak values in the peak information.

[0142] S144. Calculate the number of peaks per unit time according to the peak information to obtain the tempo of the target music.

[0143] S145 . Obtain, according to the beat and mode of the target music, a target position corresponding to the target music in a two-dimensional rectangular coordinate system constructed based on the beat and mode.

[0144] S146 . Acquire a target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and the preset radius.

[0145] The implementation of steps S141 to S146 may refer to the implementation of steps S801 to S806 above, and will not be described in detail here to avoid redundancy.

[0146] S147 . Determine the center position of each emotional key in the two-dimensional rectangular coordinate system according to the beat range and mode range corresponding to each emotional key.

[0147] In some embodiments, the beat range and mode range of the emotional tone may be as shown in Table 2 below:

[0148] Table 2

[0149]

[0150] Based on Table 2, it can be determined that the coordinates of the center position of [Excited] in the two-dimensional rectangular coordinate system are (150 beats / minute, 240Hz), the coordinates of the center position of [Calm] in the two-dimensional rectangular coordinate system are (90 beats / minute, 750Hz), and the coordinates of the center position of [Calm] in the two-dimensional rectangular coordinate system are (30 beats / minute, 1500Hz).

[0151] S148 . Determine the sample music whose corresponding position is located in the target area according to the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system.

[0152] That is, it is determined whether the corresponding position of each sample music piece in the sample data set in the two-dimensional rectangular coordinate system is within the target area, and the sample music pieces whose corresponding positions are within the target area are extracted.

[0153] S149: Determine the number of sample music pieces corresponding to each emotional tone in the sample music pieces whose corresponding positions are located in the target area, and determine the emotional tone with the largest number of corresponding sample music pieces as the emotional tone of the target music piece.

[0154] For example: in the sample music located in the target area, the number of sample music pieces corresponding to [excited] is x, the number of sample music pieces corresponding to [calm] is y, and the number of sample music pieces corresponding to [calm] is z, and x < z < y. Then it can be determined that among the sample music pieces corresponding to the target area at the corresponding position, the number of sample music pieces corresponding to calm is the largest, and thus the emotional tone of the target music is determined to be calm.

[0155] S1410. Obtain the corresponding lighting control instruction for the target music according to the emotional tone of the target music.

[0156] S1411. When playing the target music, send the lighting control instruction to at least one lamp in the area where the music playing device is located, so as to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instruction.

[0157] In the above embodiments, it is also necessary to obtain the target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and the preset radius. Therefore, some embodiments of the present application further provide the following implementation manners for determining the preset radius:

[0158] Step ①: Determine the central position corresponding to each emotional tone in the two-dimensional rectangular coordinate system according to the beat range and mode range corresponding to each emotional tone.

[0159] Step ②: Obtain the second threshold distance corresponding to each emotional tone according to the distribution of each sample music piece in the two-dimensional rectangular coordinate system in the sample data set and the emotional tone of each sample music piece.

[0160] Among them, the second threshold distance corresponding to any emotional tone is the maximum radius with the central position corresponding to this emotional tone as the center of the circle so that the emotional tones of each sample music piece within the coverage of the circular area are all this emotional tone.

[0161] Step ③: Determine the minimum value among the second threshold distances corresponding to each emotional tone as the preset radius.

[0162] Exemplarily, referring to Figure 15As shown, the center position corresponding to [excited] in the two-dimensional rectangular coordinate system is point e, the center position corresponding to [calm] in the two-dimensional rectangular coordinate system is point f, and the center position corresponding to [depressed] in the two-dimensional rectangular coordinate system is point g. Based on the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system, it can be known that: r1 is the maximum radius that makes the emotional tone of each sample music within the shape area covered by point e as the center of the circle all be [excited], r2 is the maximum radius that makes the emotional tone of each sample music within the shape area covered by point f as the center of the circle all be [calm], r3 is the maximum radius that makes the emotional tone of each sample music within the shape area covered by point g as the center of the circle all be [depressed], and r1>r3>r2, then the preset radius can be determined as r2.

[0163] In some embodiments, some embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computing device, the computing device implements the music playing method provided in any of the above embodiments.

[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not depart from the scope of the technical solutions of the embodiments of the present application.

[0165] For ease of explanation, the above description has been made with reference to specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations are possible. The above embodiments are selected and described to better explain the principles and practical applications, so that those skilled in the art can better utilize the embodiments and various different variations of the embodiments suitable for specific use considerations.

Claims

1. A music playing device, characterized in that: include: The controller is configured to: obtain the beat and mode of the target music; Obtaining, according to the beat and mode of the target music, a target position corresponding to the target music in a two-dimensional rectangular coordinate system constructed based on the beat and mode; Acquire a target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and a preset radius; Obtaining the emotional tone of the target music piece based on the target area and the distribution of each sample music piece in the sample data set in the two-dimensional rectangular coordinate system; wherein the sample data set includes a plurality of sample music pieces and the emotional tone of each sample music piece; Obtaining a lighting control instruction corresponding to the target music according to the emotional tone of the target music; The audio output interface is configured to: play the target music; The communicator is configured to: when playing the target music, send the lighting control instruction to at least one lamp in the area where the music playing device is located, so as to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instruction.

2. The music playing device according to claim 1, wherein The controller is specifically configured to: Performing Fourier transform on the time domain signal corresponding to the target music to obtain a frequency domain signal corresponding to the target music; Obtaining peak information of a frequency domain signal corresponding to the target music; determining the mode of the target music according to the frequencies corresponding to the peak values in the peak information; The number of peaks per unit time is calculated according to the peak information to obtain the beat of the target music.

3. The music playing device according to claim 2, characterized in that The controller is specifically configured to: performing differential processing on the frequency domain signal corresponding to the target music to obtain a differential signal corresponding to the target music; Peak detection is performed on the differential signal to obtain peak information of the frequency domain signal corresponding to the target music.

4. The music playing device according to claim 1, wherein The controller is specifically configured to: Determining, based on the distribution of each sample music piece in the sample data set in the two-dimensional rectangular coordinate system and the emotional tone of each sample music piece, a region corresponding to each emotional tone in the two-dimensional rectangular coordinate system; Obtaining overlapping areas between the regions corresponding to each emotional tone and the target region; The emotional key corresponding to the region with the largest overlapping area is determined as the emotional key of the target music.

5. The music playing device according to claim 1, characterized in that: The controller is specifically configured to: Determining the sample music whose corresponding position is located in the target area according to the distribution of each sample music in the sample data set in the two-dimensional rectangular coordinate system; Determining the number of sample music pieces corresponding to each emotional tone in the sample music pieces located in the target area; The emotional tone of the sample music pieces having the largest number of corresponding elements is determined as the emotional tone of the target music piece.

6. The music playing device according to claim 1, characterized in that The controller is further configured to: Determining, based on the distribution of each sample music piece in the sample data set in the two-dimensional rectangular coordinate system and the emotional tone of each sample music piece, a region corresponding to each emotional tone in the two-dimensional rectangular coordinate system; Obtaining, based on the regions corresponding to the respective emotional tones, first threshold distances corresponding to the respective emotional tones; the first threshold distance corresponding to any emotional tone is the minimum distance from the geometric center of the region corresponding to the emotional tone to the boundary of the region corresponding to the emotional tone; The minimum value of the first threshold distances corresponding to the various emotional tones is determined as the preset radius.

7. The music playing device according to claim 1, characterized in that: The controller is further configured to: Determining the center position of each emotional tone in the two-dimensional rectangular coordinate system according to the beat range and mode range corresponding to each emotional tone; Obtaining, based on the distribution of each sample music piece in the sample data set in the two-dimensional rectangular coordinate system and the emotional tone of each sample music piece, a second threshold distance corresponding to each emotional tone, wherein the second threshold distance corresponding to any emotional tone is a maximum radius such that the emotional tone of each sample music piece within a circular area covered by the emotional tone is the center position of the circle corresponding to the emotional tone; The minimum value of the second threshold distances corresponding to the various emotional tones is determined as the preset radius.

8. The music playing device according to claim 1, characterized in that: The controller is configured to: Obtaining a lighting control instruction corresponding to the target music according to the emotional tone of the target music and a preset mapping relationship; The preset mapping relationship includes lighting control instructions corresponding to each emotional tone.

9. The music playing device according to claim 1, characterized in that: The communicator is configured to: When the target music is played, the lighting control instruction is converted into a corresponding remote control signal, and the remote control signal is sent to the at least one lamp.

10. A music playing method, characterized in that: include: Obtain the beat and mode of the target music; Obtaining, according to the beat and mode of the target music, a target position corresponding to the target music in a two-dimensional rectangular coordinate system constructed based on the beat and mode; Acquire a target area corresponding to the target music in the two-dimensional rectangular coordinate system according to the target position and a preset radius; Obtaining the emotional tone of the target music piece based on the target area and the distribution of each sample music piece in the sample data set in the two-dimensional rectangular coordinate system; wherein the sample data set includes a plurality of sample music pieces and the emotional tone of each sample music piece; Obtaining a lighting control instruction corresponding to the target music according to the emotional tone of the target music; When the target music is played, the lighting control instruction is sent to at least one lamp in the area where the music playing device is located, so as to control the at least one lamp to adjust the color temperature and / or brightness according to the lighting control instruction.