Music arrangement method and device and electronic equipment
By calculating the correlation coefficient of the audio curve, the slave music material that matches the main music material is automatically selected, which solves the problem in the existing technology that it is difficult to automatically pair bass and drums in computer composition, and improves the efficiency of music arrangement.
Patent Information
- Application Number
- CN202411364583.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, bass and drums are difficult to automatically screen paired music materials in computer composition, resulting in inefficient music arrangement.
By obtaining the main music material and the audio curve of the music material, calculate the number of relationships, and select the material that matches the main music material from multiple music materials according to the relevant coefficient.
It realizes automatic screening of paired music materials, significantly speeding up the efficiency of music arrangement or production.
Smart Images

Figure CN119360807A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of music arrangement, and in particular, to a music arrangement method, device, and electronic device. Background Art
[0002] In computer composition, bass and drums are very important components, which together constitute the rhythm and rhythm of the music. Generally speaking, bass and drums are interdependent in computer composition. Bass is usually responsible for laying the tone and rhythm of the entire music, setting the beat for the drums, and also providing support and a stable foundation for other instruments.
[0003] The alignment of the bass and drums is very important. The bass and drums are the basis of the rhythm and rhythm of the music. If they are not aligned correctly, the rhythm of the whole music will be wrong and it will cause confusion.
[0004] If the suitability screening of rhythmic music materials is to be achieved, it can only be achieved through user experience and trial and error, or by manually editing the audio files to achieve beat alignment. Summary of the invention
[0005] In response to the problems existing in the above-mentioned prior art, the embodiments of the present application provide a music arrangement method, device, and electronic device, which can automatically screen paired music materials and accelerate the efficiency of music arrangement or production.
[0006] In a first aspect, an embodiment of the present application provides a music arrangement method, comprising the following steps:
[0007] Obtaining audio curves of a main music material and multiple slave music materials;
[0008] Calculating correlation coefficients of audio curves of the master music material and the plurality of slave music materials; and
[0009] According to the calculated correlation coefficient, a slave music material matching the master music material is selected from the plurality of slave music materials.
[0010] Further, selecting a slave music material matching the master music material from the plurality of slave music materials according to the calculated correlation coefficient includes:
[0011] sorting the calculated correlation coefficients; and
[0012] According to the sequence of the correlation coefficients, a slave music material matching the master music material is selected from the plurality of slave music materials.
[0013] Further, the sorting of the calculated correlation coefficients includes:
[0014] According to the size of the correlation coefficient, the correlation coefficients are sorted in descending order.
[0015] Furthermore, before obtaining the audio curves of the master music material and the plurality of slave music materials, the method further includes:
[0016] Frequency filtering is performed on the main music material and the plurality of secondary music materials.
[0017] Furthermore, the frequency filtering of the main music material and the plurality of secondary music materials includes:
[0018] The main music material and the plurality of secondary music materials are frequency filtered by a bandpass filter.
[0019] Furthermore, the main music material is bass audio, and the slave music material is drum audio.
[0020] Furthermore, the frequency filtering of the main music material and the plurality of secondary music materials by using a bandpass filter comprises:
[0021] The frequency range of the bass audio after filtering is 50 to 1000 Hz, and the frequency range of the drum audio after filtering is 50 to 180 Hz.
[0022] In a second aspect, the present application also provides a music arrangement device, including:
[0023] A curve acquisition module, used to acquire audio curves of a main music material and a plurality of slave music materials;
[0024] A correlation coefficient calculation module, used for calculating the correlation coefficient of the audio curves of the main music material and the plurality of secondary music materials; and
[0025] The material selection module is used to select a slave music material matching the main music material from the plurality of slave music materials according to the calculated correlation coefficient.
[0026] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the music arrangement method according to the first aspect described above when executing the program.
[0027] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, wherein the computer program is used to implement the music arranging method according to the first aspect above.
[0028] The embodiments of the present application bring the following beneficial effects:
[0029] In the music arrangement method provided in the embodiment of the present application, after obtaining the audio curves of the main music material and the multiple secondary music materials, the correlation coefficient of the audio curves of the main music material and the multiple secondary music materials is calculated, and according to the calculated correlation coefficient, the secondary music material matching the main music material is selected from the multiple secondary music materials. Therefore, the music arrangement method provided in the embodiment of the present application can automatically screen the paired music materials and accelerate the efficiency of music arrangement or production. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0031] Figure 1 A schematic diagram of a music arrangement method according to an embodiment of the present invention;
[0032] Figure 2 An example diagram of a music arrangement method provided in an embodiment of the present application;
[0033] Figure 3 A structural block diagram of a music arrangement device provided in an embodiment of the present application;
[0034] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0035] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments described in the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0037] In the specification and claims of this application and the above-mentioned drawings, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "multiple" means two or more. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to the specific circumstances.
[0038] Figure 1 FIG. 1 is a flowchart of a music arrangement method according to an embodiment of the present application. Figure 1 As shown, the music arrangement method of the embodiment of the present application includes the following steps:
[0039] S101: Acquire audio curves of a main music material and a plurality of slave music materials;
[0040] Specifically, the audio curve here is usually an audio time domain graph, such as Figure 2 As shown in FIG. 1 , the horizontal axis of the audio time domain graph is time (seconds), and the vertical axis is relative intensity (between 0 and 1). The audio time domain graph measures a section of audio from the time dimension.
[0041] S102: Calculating the correlation coefficient of the audio curves of the main music material and the plurality of secondary music materials; and
[0042] Specifically, after obtaining the audio curves of the main music material and multiple slave music materials, it is necessary to calculate the correlation coefficient. If the signals of the two music materials are completely correlated, their correlation coefficient is 1. If the signals of the two music materials are completely correlated, their correlation coefficient is -1. Therefore, the value of the correlation coefficient will be between 1 and -1.
[0043] S103: According to the calculated correlation coefficient, selecting a slave music material matching the master music material from the plurality of slave music materials.
[0044] As described above, after calculating the correlation coefficient of the audio curves of the main music material and the plurality of secondary music materials, secondary music materials matching the main music material can be selected from the plurality of secondary music materials according to the calculated correlation coefficient.
[0045] Therefore, in the music arrangement method provided in the embodiment of the present application, after obtaining the audio curves of the main music material and the multiple secondary music materials, the correlation coefficient of the audio curves of the main music material and the multiple secondary music materials is calculated, and according to the calculated correlation coefficient, the secondary music material matching the main music material is selected from the multiple secondary music materials. Therefore, the music arrangement method provided in the embodiment of the present application can automatically screen the paired music materials and accelerate the efficiency of music arrangement or production.
[0046] Further, refer to Figure 2 In some embodiments of the present application, selecting a slave music material matching the master music material from the plurality of slave music materials according to the calculated correlation coefficient includes:
[0047] sorting the calculated correlation coefficients; and
[0048] According to the sequence of the correlation coefficients, a slave music material matching the master music material is selected from the plurality of slave music materials.
[0049] Specifically, after calculating the correlation coefficients of the audio curves of the main music material and the multiple slave music materials, the calculated correlation coefficients are sorted, and according to the sequence of the correlation coefficients, slave music materials that match the main music material are selected from the multiple slave music materials. Therefore, the paired music materials can be further automatically screened, thereby accelerating the efficiency of music arrangement or production.
[0050] For example, Figure 2 As shown in the figure, when using 75BPM (Beat PerMinute) bass audio to calculate and screen 29 drum audios of the same 75BPM, the correlation coefficient of the most suitable drum audio is 0.14, and the correlation coefficient of the least suitable drum audio is -0.084. After subjective detection by users, it can be found that the above algorithm can successfully select suitable (harmonious listening) and unsuitable (each playing its own) music combinations.
[0051] Further, in some embodiments of the present application, the step of sorting the calculated correlation coefficients includes:
[0052] According to the size of the correlation coefficient, the correlation coefficients are sorted in descending order.
[0053] Specifically, after calculating the correlation coefficient of the audio curves of the main music material and the multiple slave music materials, they are sorted in descending order according to the size of the correlation coefficient, so as to select the slave music material that matches the main music material from the multiple slave music materials. Therefore, the paired music materials can be further automatically screened to speed up the efficiency of music arrangement or production.
[0054] Furthermore, in some embodiments of the present application, before obtaining the audio curves of the master music material and the plurality of slave music materials, the method further includes:
[0055] Frequency filtering is performed on the main music material and the plurality of secondary music materials.
[0056] Specifically, when producing or arranging music, it is necessary to filter specific frequencies of the music material to improve the quality of the music material. Therefore, before obtaining the audio curves of the main music material and multiple slave music materials, it also includes frequency filtering of the main music material and the multiple slave music materials, so as to further improve the quality of the produced music.
[0057] Further, in some embodiments of the present application, the frequency filtering of the main music material and the plurality of secondary music materials includes:
[0058] The main music material and the plurality of secondary music materials are frequency filtered by a bandpass filter.
[0059] Specifically, a band-pass filter is a device that allows waves of a specific frequency band to pass through while shielding other frequency bands. When making or arranging music, it is necessary to filter the specific frequencies of the music material to improve the quality of the music material. Therefore, before obtaining the audio curves of the main music material and the multiple secondary music materials, the main music material and the multiple secondary music materials are frequency filtered by a band-pass filter, thereby further improving the quality of the produced music.
[0060] Furthermore, in some embodiments of the present application, the master music material is bass audio, and the slave music material is drum audio.
[0061] As mentioned above, bass and drums are interdependent in computer composition. Bass is usually responsible for laying the tone and rhythm of the entire music, setting the beat for the drums, and also providing support and a stable foundation for other instruments. Therefore, in the music arrangement method provided in the embodiment of the present application, the main music material is bass audio, and the secondary music material is drum audio, thereby providing a basis for music arrangement.
[0062] Further, in some embodiments of the present application, the frequency filtering of the main music material and the plurality of secondary music materials by a bandpass filter includes:
[0063] The frequency range of the bass audio after filtering is 50 to 1000 Hz, and the frequency range of the drum audio after filtering is 50 to 180 Hz.
[0064] Specifically, in music production, one would like the low-frequency part of the drum track to match the bass playing, so in practice the frequency filter of the drum is set to filter out signal energy outside the range of 50Hz to 180Hz, while the bass part is set to filter out signal energy outside the range of 50Hz to 1000Hz, thereby improving the quality of the produced music.
[0065] Figure 3 2 is a structural block diagram of the music arrangement device 200 provided in the embodiment of the present application. Figure 3 As shown, the music arrangement device 200 of the embodiment of the present application includes: a curve acquisition module 210, a correlation coefficient calculation module 220 and a material selection module 230, wherein:
[0066] The curve acquisition module 210 is used to acquire the audio curves of the main music material and the multiple slave music materials;
[0067] A correlation coefficient calculation module 220, used to calculate the correlation coefficient of the audio curves of the main music material and the plurality of secondary music materials; and
[0068] The material selection module 230 is used to select a sub-music material matching the main music material from the plurality of sub-music materials according to the calculated correlation coefficient.
[0069] In the music arrangement device provided in the embodiment of the present application, after obtaining the audio curves of the main music material and the multiple secondary music materials, the correlation coefficient of the audio curves of the main music material and the multiple secondary music materials is calculated, and the secondary music material matching the main music material is selected from the multiple secondary music materials according to the calculated correlation coefficient. Therefore, the music arrangement method provided in the embodiment of the present application can automatically screen the paired music materials and accelerate the efficiency of music arrangement or production.
[0070] It should be noted that the specific implementation method of the music arrangement device of the embodiment of the present application is similar to the specific implementation method of the music arrangement method of the embodiment of the present application. Please refer to the description of the method part for details, and no further details will be given here.
[0071] Figure 4 Schematic diagram of the structure of an electronic device 300 according to an embodiment of the present application.
[0072] like Figure 4As shown, the electronic device 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from the storage part 302 to a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0073] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.
[0074] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 309, and / or installed from a removable medium 311. When the computer program is executed by a central processing unit (CPU) 301, the above-mentioned functions defined in the electronic device of the present application are executed.
[0075] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electronic device, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0076] In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction-executing electronic device, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction-executing electronic device, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0077] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the processing receiving device, method and computer program product according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the aforementioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based electronic device that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0078] The units or modules involved in the embodiments described in this application may be implemented by software or hardware. The units or modules described may also be arranged in a processor, and the processor is used to implement the music arrangement method when executing the program:
[0079] Obtaining audio curves of a main music material and multiple slave music materials;
[0080] Calculating correlation coefficients of audio curves of the master music material and the plurality of slave music materials; and
[0081] According to the calculated correlation coefficient, a slave music material matching the master music material is selected from the plurality of slave music materials.
[0082] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently and not be assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the music arrangement method described in the present application:
[0083] Obtaining audio curves of a main music material and multiple slave music materials;
[0084] Calculating correlation coefficients of audio curves of the master music material and the plurality of slave music materials; and
[0085] According to the calculated correlation coefficient, a slave music material matching the master music material is selected from the plurality of slave music materials.
[0086] As another aspect, the present application further provides a computer program product, which may be included in the electronic device described in the above embodiment; or may exist independently without being installed in the electronic device. The above computer program product stores one or more programs, and when the above programs are used by one or more processors to execute the music arrangement method described in the present application:
[0087] Obtaining audio curves of a main music material and multiple slave music materials;
[0088] Calculating correlation coefficients of audio curves of the master music material and the plurality of slave music materials; and
[0089] According to the calculated correlation coefficient, a slave music material matching the master music material is selected from the plurality of slave music materials.
[0090] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. All equivalent structural changes made by using the contents of the present application specification and drawings under the application concept of the present application, or directly / indirectly used in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A music arrangement method, characterized in that: The following steps are involved: Obtaining audio curves of a main music material and multiple slave music materials; Calculating the correlation coefficient of the audio curves of the main music material and the plurality of secondary music materials; and According to the calculated correlation coefficient, a slave music material matching the master music material is selected from the plurality of slave music materials.
2. The music arrangement method according to claim 1, characterized in that: The selecting, according to the calculated correlation coefficient, a slave music material matching the master music material from the plurality of slave music materials comprises: sorting the calculated correlation coefficients; and According to the sequence of the correlation coefficients, a slave music material matching the master music material is selected from the plurality of slave music materials.
3. The music arrangement method according to claim 2, characterized in that: The step of sorting the calculated correlation coefficients comprises: According to the size of the correlation coefficient, the correlation coefficients are sorted in descending order.
4. The music arrangement method according to claim 3, characterized in that: Before obtaining the audio curves of the master music material and the plurality of slave music materials, the method further includes: Frequency filtering is performed on the main music material and the plurality of secondary music materials.
5. The music arrangement method according to claim 4, characterized in that: The frequency filtering of the main music material and the plurality of secondary music materials comprises: The main music material and the plurality of secondary music materials are frequency filtered by a bandpass filter.
6. The music arrangement method according to claim 5, characterized in that: The master music material is bass audio, and the slave music material is drum audio.
7. The music arrangement method according to claim 6, characterized in that: The frequency filtering of the main music material and the plurality of secondary music materials by using a bandpass filter comprises: The frequency range of the bass audio after filtering is 50 to 1000 Hz, and the frequency range of the drum audio after filtering is 50 to 180 Hz.
8. A music arrangement device, characterized in that: include: A curve acquisition module, used to acquire audio curves of a main music material and a plurality of slave music materials; A correlation coefficient calculation module, used for calculating the correlation coefficient of the audio curves of the main music material and the plurality of secondary music materials; and The material selection module is used to select a slave music material matching the main music material from the plurality of slave music materials according to the calculated correlation coefficient.
9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to implement the music arranging method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to implement the music arranging method according to any one of claims 1-7.