CN109584845B - Automatic music distribution method and system, terminal and computer readable storage medium - Google Patents

Automatic music distribution method and system, terminal and computer readable storage medium Download PDF

Info

Publication number
CN109584845B
CN109584845B CN201811368904.4A CN201811368904A CN109584845B CN 109584845 B CN109584845 B CN 109584845B CN 201811368904 A CN201811368904 A CN 201811368904A CN 109584845 B CN109584845 B CN 109584845B
Authority
CN
China
Prior art keywords
audio file
time
track
predetermined
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811368904.4A
Other languages
Chinese (zh)
Other versions
CN109584845A (en
Inventor
王义文
刘奡智
王健宗
肖京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811368904.4A priority Critical patent/CN109584845B/en
Publication of CN109584845A publication Critical patent/CN109584845A/en
Application granted granted Critical
Publication of CN109584845B publication Critical patent/CN109584845B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/0008Associated control or indicating means
    • G10H1/0025Automatic or semi-automatic music composition, e.g. producing random music, applying rules from music theory or modifying a musical piece
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/02Means for controlling the tone frequencies, e.g. attack or decay; Means for producing special musical effects, e.g. vibratos or glissandos
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H2210/00Aspects or methods of musical processing having intrinsic musical character, i.e. involving musical theory or musical parameters or relying on musical knowledge, as applied in electrophonic musical tools or instruments
    • G10H2210/031Musical analysis, i.e. isolation, extraction or identification of musical elements or musical parameters from a raw acoustic signal or from an encoded audio signal
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H2210/00Aspects or methods of musical processing having intrinsic musical character, i.e. involving musical theory or musical parameters or relying on musical knowledge, as applied in electrophonic musical tools or instruments
    • G10H2210/101Music Composition or musical creation; Tools or processes therefor
    • G10H2210/111Automatic composing, i.e. using predefined musical rules
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H2210/00Aspects or methods of musical processing having intrinsic musical character, i.e. involving musical theory or musical parameters or relying on musical knowledge, as applied in electrophonic musical tools or instruments
    • G10H2210/155Musical effects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Electrophonic Musical Instruments (AREA)
  • Auxiliary Devices For Music (AREA)

Abstract

The invention provides an automatic music distribution method and system, a terminal and a computer readable storage medium, and relates to the technical field of research and development management, wherein the method comprises the following steps: acquiring an audio file; adjusting the speed of the audio file to a preset speed corresponding to a preset melody type, and adjusting the start-stop time of preset notes in the audio file according to a time adjustment rule corresponding to the preset melody type; creating a cello track and/or a piano track for the adjusted audio file; and merging the adjusted audio file with the cello track and/or the piano track, and outputting a target audio file. According to the technical scheme, the purpose of automatically creating the effect of the specific atmosphere is achieved, the hearing experience is improved, the labor cost and the time cost in the music proportioning process for the specific atmosphere are reduced, and the music proportioning efficiency and the effect are improved.

Description

Automatic music distribution method and system, terminal and computer readable storage medium
[ field of technology ]
The present invention relates to the field of research and development management technologies, and in particular, to an automatic music distribution method and system, a terminal, and a computer readable storage medium.
[ background Art ]
Existing automatic matching or harmony algorithms are mainly configured for common tradition and popular harmony, however, when matching is required for a special atmosphere (such as a stressful atmosphere), the matching method is not applicable, and matching and harmony is required for the special atmosphere manually. However, the manual music is extremely labor intensive and prone to errors, which can lead to poor efficiency and quality for the particular atmosphere.
Therefore, how to efficiently and accurately perform music distribution for a special atmosphere becomes a technical problem to be solved at present.
[ invention ]
The embodiment of the invention provides an automatic music distribution method and system, a terminal and a computer readable storage medium, which aim to solve the technical problem that the efficiency and quality are low when a special atmosphere is distributed in the related technology, and can efficiently and accurately carry out automatic music distribution for the special atmosphere, thereby improving the efficiency and music distribution effect of the special atmosphere.
In a first aspect, an embodiment of the present invention provides an automatic music score method, including: acquiring an audio file; adjusting the speed of the audio file to a preset speed corresponding to a preset melody type, and adjusting the start-stop time of preset notes in the audio file according to a time adjustment rule corresponding to the preset melody type; creating a cello track and/or a piano track for the adjusted audio file; and merging the adjusted audio file with the cello track and/or the piano track, and outputting a target audio file.
In the above embodiment of the present invention, optionally, the predetermined melody type is a tense atmosphere type, a relaxed atmosphere type, a sad atmosphere type, or a cheerful atmosphere type, wherein the predetermined speed is 70bmp in case that the predetermined melody type is the tense atmosphere type; the time adjustment rule is as follows: advancing the start time of notes with even numbers in the audio file by a preset time length; and advancing the ending time of the preceding note of the even numbered notes by the predetermined length of time.
In the above embodiment of the present invention, optionally, the predetermined period is a predetermined share of a difference between a start time of the even numbered note and a start time of the preceding note, and the predetermined share includes 1/2, 1/3, and 1/4.
In the above embodiment of the present invention, optionally, the step of creating a cello track and/or a piano track for the audio file includes: acquiring the number of bars of the audio file and the pitch value of each note; dividing the audio file into a plurality of time periods according to the number of bars; and adjusting the pitch value of each note in each period according to a pitch value adjustment rule corresponding to each period under the preset melody type.
In the above embodiment of the present invention, optionally, in the case where the predetermined melody type is the stressful atmosphere type, the step of dividing the audio file into a plurality of periods according to the number of bars includes: and determining a first time node, a second time node and a third time node according to the number of the bars, wherein the first time node is 0, the second time node is at the position where the number of the previous bars accounts for 1/3 of the total number of the bars, and the third time node is at the position where the number of the previous bars accounts for 2/3 of the total number of the bars.
In the above embodiment of the present invention, optionally, the pitch value adjustment rule corresponding to the piano track is: selecting a target chord and a target pitch value in the corresponding chord-pitch value list between every two time nodes; and writing the notes with the mark 1 in each bar into the corresponding positions in the piano track according to the target chord and increasing the target pitch value.
In the above embodiment of the present invention, optionally, the pitch value adjustment rule corresponding to the cello track is: changing a start time and an end time of a predetermined note; and setting the pitch value of the preset note as the pitch value of the first note in the measure where the preset note is located.
In a second aspect, an embodiment of the present invention provides an automatic score system, including: an audio file acquisition unit for acquiring an audio file; an audio file adjusting unit, configured to adjust a velocity of the audio file to a predetermined velocity corresponding to a predetermined melody type, and adjust a start-stop time of a predetermined note in the audio file according to a time adjustment rule corresponding to the predetermined melody type; a track creation unit for creating a cello track and/or a piano track for the adjusted audio file; and the track merging unit is used for merging the adjusted audio file with the cello track and/or the piano track and outputting a target audio file.
In the above embodiment of the present invention, optionally, the predetermined melody type is a tense atmosphere type, a relaxed atmosphere type, a sad atmosphere type, or a cheerful atmosphere type, wherein the predetermined speed is 70bmp in case that the predetermined melody type is the tense atmosphere type; the time adjustment rule is as follows: advancing the start time of notes with even numbers in the audio file by a preset time length; and advancing the ending time of the preceding note of the even numbered notes by the predetermined length of time.
In the above embodiment of the present invention, optionally, the predetermined period is a predetermined share of a difference between a start time of the even numbered note and a start time of the preceding note, and the predetermined share includes 1/2, 1/3, and 1/4.
In the above-described embodiment of the present invention, optionally, the track creation unit includes: a parameter obtaining unit for obtaining the number of bars of the audio file and the pitch value of each note; a time period dividing unit for dividing the audio file into a plurality of time periods according to the number of bars; and the pitch value adjusting unit is used for adjusting the pitch value of each note in each period according to a pitch value adjusting rule corresponding to each period under the preset melody type.
In the above-described embodiment of the present invention, optionally, in the case where the predetermined melody type is the stressful atmosphere type, the period dividing unit is configured to: and determining a first time node, a second time node and a third time node according to the number of the bars, wherein the first time node is 0, the second time node is at the position where the number of the previous bars accounts for 1/3 of the total number of the bars, and the third time node is at the position where the number of the previous bars accounts for 2/3 of the total number of the bars.
In the above embodiment of the present invention, optionally, the pitch value adjustment rule corresponding to the piano track is: selecting a target chord and a target pitch value in the corresponding chord-pitch value list between every two time nodes; and writing the notes with the mark 1 in each bar into the corresponding positions in the piano track according to the target chord and increasing the target pitch value.
In the above embodiment of the present invention, optionally, the pitch value adjustment rule corresponding to the cello track is: changing a start time and an end time of a predetermined note; and setting the pitch value of the preset note as the pitch value of the first note in the measure where the preset note is located.
In a third aspect, an embodiment of the present invention provides a terminal, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform the method of any of the first aspects above.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions for performing the method flow of any one of the first aspects above.
According to the technical scheme, aiming at the technical problems that the efficiency and quality are low when the music is matched for the special atmosphere in the related technology, automatic music matching can be efficiently and accurately carried out for the special atmosphere, specifically, the preset melody types which are needed to be matched for the audio file can be judged, wherein the preset melody types comprise but are not limited to a tension atmosphere type, a light atmosphere type, a cooling atmosphere type or a cheerful atmosphere type, each preset melody type corresponds to a respective melody processing scheme, after the audio file is subjected to melody processing according to the preset melody type, a violin rail and/or a piano rail can be created for the audio file, the audio of the atmosphere in the preset melody type is matched and enhanced on the violin rail and/or the piano rail, and finally, the violin rail and/or the piano rail and the audio file are combined, so that the target audio file with the enhanced atmosphere in the preset melody type is obtained, and the purpose of processing the audio file into the music matching of the preset melody type is achieved.
Through the technical scheme, the purpose of automatically creating the effect of the specific atmosphere is achieved, the hearing experience is improved, the labor cost and the time cost in the music proportioning process for the specific atmosphere are reduced, and the music proportioning efficiency and the effect are improved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a flow chart of an automatic score method of one embodiment of the present invention;
FIG. 2 illustrates a basic algorithm framework for automatic score-keeping for a stressful atmosphere type according to one embodiment of the present invention;
FIG. 3 illustrates a block diagram of an automatic score system of one embodiment of the present invention;
fig. 4 shows a block diagram of a terminal of an embodiment of the invention.
[ detailed description ] of the invention
For a better understanding of the technical solution of the present invention, the following detailed description of the embodiments of the present invention refers to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Fig. 1 shows a flow chart of an automatic score method of an embodiment of the present invention.
As shown in fig. 1, an embodiment of the present invention provides an automatic music score method, including:
step 102, an audio file is acquired. The audio file is a midi format single-tone melody file. The midi format single melody file is used as input, the melody region is between the small word group G and the small word group G according to the gamut characteristics of the common music melody, and the midi melody file can be in the form of 4/4 beats, 3/4 beats, 2/4 beats, and has any speed and any adjustability; the document should not be too long, and the length of about 16-24 bars is preferable.
Step 104, adjusting the speed of the audio file to a preset speed corresponding to a preset melody type, and adjusting the start and stop time of preset notes in the audio file according to a time adjustment rule corresponding to the preset melody type.
The predetermined melody types include, but are not limited to, a tense atmosphere type, a relaxed atmosphere type, a sad atmosphere type or a cheerful atmosphere type, and each predetermined melody type corresponds to a respective melody processing scheme, wherein the predetermined speeds corresponding to the predetermined melody types are in turn a cheerful atmosphere type > a tense atmosphere type > a relaxed atmosphere type > a sad atmosphere type.
The speed of the audio file is adjusted to a preset speed corresponding to the preset melody type, so that the playing speed of the audio file is more approximate to and suitable for the atmosphere corresponding to the preset melody type; the starting and ending time of the preset notes in the audio file is adjusted according to the time adjustment rule corresponding to the preset melody type, so that the starting and ending time of the preset notes in the audio file is the same as or similar to the starting and ending time of the notes corresponding to the preset melody type, and the preset notes in the audio file have the same or similar atmosphere effect as the notes corresponding to the preset melody type. Thereby, the entire audio file can be made to have an atmosphere corresponding to the predetermined melody type.
Wherein, in case the predetermined melody type is the stressful atmosphere type, the predetermined speed is 70bmp, of course, the predetermined speed under the stressful atmosphere type may be any other value adapted to the actual requirements. And in the case where the predetermined melody type is the stressful atmosphere type, the time adjustment rule is: advancing the start time of notes with even numbers in the audio file by a preset time length; and advancing the ending time of the preceding note of the even numbered notes by the predetermined length of time. Thus, the duration of the even-numbered notes is prolonged, so that the listening feeling of the even-numbered notes is emphasized, and a tension atmosphere is realized.
In addition, the predetermined duration is a predetermined share of a difference between a start time of the even numbered notes and a start time of the preceding notes, the predetermined share including 1/2, 1/3, and 1/4, whereby the preceding notes can be finished early, i.e., shortened so that the preceding notes are in a fast rhythm, thereby emphasizing a tension atmosphere.
And 106, creating a cello track and/or a piano track for the adjusted audio file.
In particular, the number of bars of the audio file and the pitch value of each note may be obtained; dividing the audio file into a plurality of time periods according to the number of bars; and adjusting the pitch value of each note in each period according to a pitch value adjustment rule corresponding to each period under the preset melody type. I.e. for different instrument tracks, different pitch value adjustment rules may be used for adjustment.
Wherein the step of dividing the audio file into a plurality of time periods comprises: and determining a first time node, a second time node and a third time node according to the number of the bars, wherein the first time node is 0, the second time node is at the position where the number of the previous bars accounts for 1/3 of the total number of the bars, and the third time node is at the position where the number of the previous bars accounts for 2/3 of the total number of the bars. Therefore, in different time development intervals, a note combination is selected randomly for each note in sequence, and the note combination is written into the cello track and/or the piano track.
In one implementation of the present invention, the pitch value adjustment rule corresponding to the piano track is: selecting a target chord and a target pitch value in the corresponding chord-pitch value list between every two time nodes; and writing the notes with the mark 1 in each bar into the corresponding positions in the piano track according to the target chord and increasing the target pitch value.
For example, the starting time, the ending time and the pitch [ n ] of the first note are read, and the three-decreasing chord or the three-increasing chord in the following table are randomly selected at the starting time and the ending time, and after a chord is selected, all the notes with the number of 1 are written, wherein pitch [ n ] +x refers to the notes with the corresponding pitch in midi protocol, and the notes with the corresponding pitch are obtained; in table 1, 1 indicates that the tone is present, and 0 indicates that the tone is absent.
In one implementation of the present invention, the pitch value adjustment rule corresponding to the cello track is: changing a start time and an end time of a predetermined note; and setting the pitch value of the preset note as the pitch value of the first note in the measure where the preset note is located.
For example, the pitch of the cello track is limited between the small word group #c and the small word group C, and unlike the piano track, the start time and the end time of the cello note are independent from the start time and the end time of the melody note, and the duration of the time value is changed in different stages, so that an accelerated listening feeling is generated and a musical tension feeling is increased. The pitch is related to the first beat, if a beat has a rest (i.e. no notes exist in midi file), the first note of the previous beat is continued; when determining the pitch, it is first confirmed which note in C#CD#DEF#FG#GA#AB is the first note in the beat, i.e., CM_pitch [ n ], and the corresponding note region defined by the violin is found for pitch writing.
And 108, merging the adjusted audio file with the cello track and/or the piano track, and outputting a target audio file. The melodies in the cello track and the piano track are atmospheres corresponding to the preset melody types, and the audio file subjected to melody processing is combined with the cello track and the piano track, so that the atmospheres corresponding to the preset melody types of the audio file can be further enhanced, and the atmospheres corresponding to the preset melody types can be automatically built for the audio file.
In general, through the above technical solution, automatic music distribution can be performed for a specific atmosphere efficiently and accurately, specifically, a predetermined melody type into which an audio file needs to be distributed can be determined, after melody processing is performed on the audio file according to the predetermined melody type, a cello track and/or a piano track can be created for the audio file, and audio matching and reinforcing the atmosphere in the predetermined melody type is provided on the cello track and/or the piano track, and finally, the cello track and/or the piano track and the audio file are combined to obtain a target audio file in which the atmosphere in the predetermined melody type is reinforced, thereby completing the purpose of processing the audio file into music distribution of the predetermined melody type.
Through the technical scheme, the purpose of automatically creating the effect of the specific atmosphere is achieved, the hearing experience is improved, the labor cost and the time cost in the music proportioning process for the specific atmosphere are reduced, and the music proportioning efficiency and the effect are improved.
Fig. 2 shows a basic algorithm framework for automatic score-keeping for a stressful atmosphere type according to an embodiment of the present invention.
As shown in fig. 2, four basic functions are included in the basic algorithm framework for automatic score-keeping:
1. midi single melody file input.
The midi format single melody file is used as input, the melody region is between the small word group G and the small word group G according to the gamut characteristics of the common music melody, and the midi melody file can be in the form of 4/4 beats, 3/4 beats, 2/4 beats, and has any speed and any adjustability; the document should not be too long, and the length of about 16-24 bars is preferable.
2. And (5) preprocessing the file. The file preprocessing link mainly adjusts the speed of the file and the starting time point of the melody notes, calculates three time nodes for use, and specifically comprises the following steps:
1) Reading the file mark and speed.
2) The tempo is modified to 70bpm (bpm is a common term for music and refers to a number of beats per minute, 70bpm means a tempo of 70 beats per minute).
3) The number of file bars barmax, pitch of notes [ n ], start time start [ n ] and end time end [ n ] are read.
4) The starting time and the ending time of each note in the melody are adjusted, specifically, the starting time start [ n ] of the even note can be advanced by a predetermined time length, wherein the predetermined time length randomly selects the following three values:
1/2(start[n]-start[n-1])、1/3(start[n]-start[n-1])、1/4(start[n]-start[n-1])
at the same time, the end [ n-1] of the previous note is reduced correspondingly for a preset time.
5) A piano and cello track is created for the midi file for use in preparing the soundtrack content for writing.
6) Calculating three development time nodes, t0=0, t1= [1/3 x barmax ], t2= [2/3 x barmax ], [ x ] refers to an integer part, and the three development time nodes sequentially time development intervals t0-t1, t1-t2 and t 2-end stages.
3. And writing the score content. For the piano track, according to the following tables 1, 2 and 3, a note combination is randomly selected for each note in sequence in different time development intervals to write into the piano track. Wherein table 1 shows the optional tones of the piano track at the t0-t1 stage, table 2 shows the optional tones of the piano track at the t1-t2 stage, and table 3 shows the optional tones of the piano track at the t 2-end stage.
In the stage t0-t1, reading the start time and the end time and pitch [ n ] from the first note, and also randomly selecting the minus chord or the plus chord in the following table at the start time and the end time, and after selecting a certain chord, writing all the notes with the number of 1 at the same time, wherein pitch [ n ] +x is the note number in midi protocol plus the corresponding value, and then notes with the corresponding pitch are obtained; in table 1, 1 indicates that the tone is present, and 0 indicates that the tone is absent.
Three chord reduction Adding three chords
pitch[n]+9 0 0
pitch[n]+8 0 1
pitch[n]+7 0 0
pitch[n]+6 1 0
pitch[n]+5 0 0
pitch[n]+4 0 1
pitch[n]+3 1 0
pitch[n]+2 0 0
pitch[n]+1 0 0
pitch[n] 1 1
TABLE 1
In the t1-t2 phase, the principle of the score writing is the same as that in the t0-t1 phase.
TABLE 2
At the t 2-end phase, the principle of the score content writing is the same as that of the t0-t1 phase.
Seven chord subtracting Seven-chord increasing method
pitch[n]+14 0 1
pitch[n]+13 0 0
pitch[n]+12 1 0
pitch[n]+11 0 0
pitch[n]+10 0 1
pitch[n]+9 0 0
pitch[n]+8 1 0
pitch[n]+7 0 0
pitch[n]+6 0 1
pitch[n]+5 1 0
pitch[n]+4 0 0
pitch[n]+3 0 0
pitch[n]+2 1 1
pitch[n]+1 0 0
pitch[n] 0 0
TABLE 3 Table 3
For the cello track, according to tables 4, 5 and 6 below, the cello randomly selects pitches in table 2 to write into the cello track during different time development intervals. Table 4 shows the sounds selectable by the cello track at the t0-t1 stage, table 5 shows the sounds selectable by the cello track at the t1-t2 stage, and table 6 shows the sounds selectable by the cello track at the t 2-end stage, wherein the duration and pitch are noted in one beat.
The pitch of the violin track is limited between the small word group #C and the small word group C, and the starting time and the ending time of the violin notes are independent of the starting time and the ending time of the melody notes, and the duration of the time value is changed at different stages, so that the accelerated listening feeling is generated, and the tension feeling on music is increased. The pitch is related to the first beat, if a beat has a rest (i.e. no notes exist in midi file), the first note of the previous beat is continued; when determining the pitch, it is first confirmed which note in C#CD#DEF#FG#GA#AB is the first note in the beat, i.e., CM_pitch [ n ], and the corresponding note region defined by the violin is found for pitch writing.
Front half racket Rear half racket
CM_pitch[n] 1 0
CM_pitch[n]-1 0 1
TABLE 4 Table 4
Front 1/3 beat Middle 1/3 racket Rear 1/3 racket
CM_pitch[n]+1 0 0 1
CM_pitch[n] 1 0 0
CM_pitch[n]-1 0 1 0
TABLE 5
Front 1/4 beat 1/4 of the middle and front swatter 1/4 of the time Rear 1/4 racket
CM_pitch[n]+1 0 0 0 1
CM_pitch[n] 1 0 0 0
CM_pitch[n]-1 0 0 1 0
CM_pitch[n]-1 0 1 0 0
TABLE 6
In addition, if the first sound of a beat of the melody is #C or C, the CM_pitch [ n ] -1 or CM_pitch [ n ] +1 will exceed the preset range, which is considered to be allowed here.
4. The melody track, the cello track, and the piano track are outputted as one midi file.
And finally, merging and outputting the inputted melody track, the piano track and the cello track, and outputting the complete score file containing the original melody and having the tension atmosphere in the midi file form.
Fig. 3 shows a block diagram of an automatic score system of one embodiment of the present invention.
As shown in fig. 3, an embodiment of the present invention provides an automatic score system 300, comprising: an audio file acquiring unit 302 configured to acquire an audio file; an audio file adjusting unit 304, configured to adjust a velocity of the audio file to a predetermined velocity corresponding to a predetermined melody type, and adjust a start-stop time of a predetermined note in the audio file according to a time adjustment rule corresponding to the predetermined melody type; a track creation unit 306 for creating a cello track and/or a piano track for the adjusted audio file; and a track merging unit 308, configured to merge the adjusted audio file with the cello track and/or the piano track, and output a target audio file.
The automatic score system 300 uses the solution described in any of the embodiments shown in fig. 1 and 2, and therefore has all the technical effects described above, and will not be described in detail here. The automatic score system 300 also has the following technical features:
in the above embodiment of the present invention, optionally, the predetermined melody type is a tense atmosphere type, a relaxed atmosphere type, a sad atmosphere type, or a cheerful atmosphere type, wherein the predetermined speed is 70bmp in case that the predetermined melody type is the tense atmosphere type; the time adjustment rule is as follows: advancing the start time of notes with even numbers in the audio file by a preset time length; and advancing the ending time of the preceding note of the even numbered notes by the predetermined length of time.
In the above embodiment of the present invention, optionally, the predetermined period is a predetermined share of a difference between a start time of the even numbered note and a start time of the preceding note, and the predetermined share includes 1/2, 1/3, and 1/4.
In the above-described embodiment of the present invention, the track creation unit 306 may optionally include: a parameter obtaining unit for obtaining the number of bars of the audio file and the pitch value of each note; a time period dividing unit for dividing the audio file into a plurality of time periods according to the number of bars; and the pitch value adjusting unit is used for adjusting the pitch value of each note in each period according to a pitch value adjusting rule corresponding to each period under the preset melody type.
In the above-described embodiment of the present invention, optionally, in the case where the predetermined melody type is the stressful atmosphere type, the period dividing unit is configured to: and determining a first time node, a second time node and a third time node according to the number of the bars, wherein the first time node is 0, the second time node is at the position where the number of the previous bars accounts for 1/3 of the total number of the bars, and the third time node is at the position where the number of the previous bars accounts for 2/3 of the total number of the bars.
In the above embodiment of the present invention, optionally, the pitch value adjustment rule corresponding to the piano track is: selecting a target chord and a target pitch value in the corresponding chord-pitch value list between every two time nodes; and writing the notes with the mark 1 in each bar into the corresponding positions in the piano track according to the target chord and increasing the target pitch value.
In the above embodiment of the present invention, optionally, the pitch value adjustment rule corresponding to the cello track is: changing a start time and an end time of a predetermined note; and setting the pitch value of the preset note as the pitch value of the first note in the measure where the preset note is located.
Fig. 4 shows a block diagram of a terminal of an embodiment of the invention.
As shown in fig. 4, a terminal 400 of one embodiment of the present invention includes at least one memory 402; and a processor 404 communicatively coupled to the at least one memory 402; wherein the memory stores instructions executable by the at least one processor 404, the instructions being configured to perform the arrangement of any of the embodiments of fig. 1 and 2 described above. Therefore, the terminal 400 has the same technical effects as any one of the embodiments of fig. 1 and 2, and will not be described herein.
In addition, an embodiment of the present invention provides a computer readable storage medium storing computer executable instructions for performing the method flow described in any one of the embodiments of fig. 1 and fig. 2.
The technical scheme of the invention is explained in detail by combining the drawings, and the aim of automatically creating the effect of the specific atmosphere is fulfilled by the technical scheme of the invention, so that the hearing experience is improved, the labor cost and the time cost in the process of dubbing the specific atmosphere are reduced, and the dubbing efficiency and the effect are improved.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Depending on the context, the word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to detection". Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should be noted that, the terminal according to the embodiment of the present invention may include, but is not limited to, a personal Computer (Personal Computer, PC), a personal digital assistant (Personal Digital Assistant, PDA), a wireless handheld device, a Tablet Computer (Tablet Computer), a mobile phone, an MP3 player, an MP4 player, and the like.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a Processor (Processor) to perform part of the steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the invention.

Claims (9)

1. An automatic music distribution method, comprising:
acquiring an audio file;
adjusting the speed of the audio file to a preset speed corresponding to a preset melody type, and adjusting the start-stop time of preset notes in the audio file according to a time adjustment rule corresponding to the preset melody type;
creating a cello track and/or a piano track for the adjusted audio file;
merging the adjusted audio file with the cello track and/or the piano track, and outputting a target audio file; the predetermined melody type is a tense atmosphere type, a relaxed atmosphere type, a sad atmosphere type, or a cheerful atmosphere type, wherein in case that the predetermined melody type is the tense atmosphere type,
the predetermined speed is 70bmp;
the time adjustment rule is as follows:
advancing the start time of notes with even numbers in the audio file by a preset time length; and
advancing the ending time of the preceding note of the even numbered notes by the predetermined length of time.
2. The automatic music distribution method according to claim 1, wherein,
the predetermined duration is a predetermined fraction of the difference between the start time of the even numbered notes and the start time of the preceding notes, the predetermined fraction including 1/2, 1/3, and 1/4.
3. The automatic music method according to claim 1, characterized in that said step of creating a cello track and/or a piano track for said audio file comprises:
acquiring the number of bars of the audio file and the pitch value of each note;
dividing the audio file into a plurality of time periods according to the number of bars;
and adjusting the pitch value of each note in each period according to a pitch value adjustment rule corresponding to each period under the preset melody type.
4. The automatic music distribution method according to claim 3, wherein, in the case where the predetermined melody type is the stressful atmosphere type,
the step of dividing the audio file into a plurality of time periods according to the number of bars includes:
and determining a first time node, a second time node and a third time node according to the number of the bars, wherein the first time node is 0, the second time node is at the position where the number of the previous bars accounts for 1/3 of the total number of the bars, and the third time node is at the position where the number of the previous bars accounts for 2/3 of the total number of the bars.
5. The automatic score method of claim 3, wherein the pitch value adjustment rule corresponding to the piano track is:
selecting a target chord and a target pitch value in the corresponding chord-pitch value list between every two time nodes;
and writing the notes with the mark 1 in each bar into the corresponding positions in the piano track according to the target chord and increasing the target pitch value.
6. The automatic music method according to claim 3, wherein the pitch value adjustment rule corresponding to the cello track is:
changing a start time and an end time of a predetermined note;
and setting the pitch value of the preset note as the pitch value of the first note in the measure where the preset note is located.
7. An automatic music distribution system, comprising:
an audio file acquisition unit for acquiring an audio file;
an audio file adjusting unit, configured to adjust a velocity of the audio file to a predetermined velocity corresponding to a predetermined melody type, and adjust a start-stop time of a predetermined note in the audio file according to a time adjustment rule corresponding to the predetermined melody type;
a track creation unit for creating a cello track and/or a piano track for the adjusted audio file;
the track merging unit is used for merging the adjusted audio file with the cello track and/or the piano track and outputting a target audio file; the predetermined melody type is a tense atmosphere type, a relaxed atmosphere type, a sad atmosphere type, or a cheerful atmosphere type, wherein in case that the predetermined melody type is the tense atmosphere type,
the predetermined speed is 70bmp;
the time adjustment rule is as follows:
advancing the start time of notes with even numbers in the audio file by a preset time length; and
advancing the ending time of the preceding note of the even numbered notes by the predetermined length of time.
8. A terminal, comprising: at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform the method flow of any one of the preceding claims 1 to 6.
9. A computer readable storage medium having stored thereon computer executable instructions for performing the method flow of any one of claims 1 to 6.
CN201811368904.4A 2018-11-16 2018-11-16 Automatic music distribution method and system, terminal and computer readable storage medium Active CN109584845B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811368904.4A CN109584845B (en) 2018-11-16 2018-11-16 Automatic music distribution method and system, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811368904.4A CN109584845B (en) 2018-11-16 2018-11-16 Automatic music distribution method and system, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109584845A CN109584845A (en) 2019-04-05
CN109584845B true CN109584845B (en) 2023-11-03

Family

ID=65923078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811368904.4A Active CN109584845B (en) 2018-11-16 2018-11-16 Automatic music distribution method and system, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109584845B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6535462B1 (en) * 2001-05-15 2003-03-18 Hanpin Electron Co., Ltd. Digital sound-signal broadcaster
US6703549B1 (en) * 1999-08-09 2004-03-09 Yamaha Corporation Performance data generating apparatus and method and storage medium
CN102610222A (en) * 2007-02-01 2012-07-25 缪斯亚米有限公司 Music transcription method, system and device
CN105161087A (en) * 2015-09-18 2015-12-16 努比亚技术有限公司 Automatic harmony method, device, and terminal automatic harmony operation method
CN105702249A (en) * 2016-01-29 2016-06-22 北京精奇互动科技有限公司 A method and apparatus for automatic selection of accompaniment
CN107301857A (en) * 2016-04-15 2017-10-27 青岛海青科创科技发展有限公司 A kind of method and system to melody automatically with accompaniment
CN108417190A (en) * 2018-03-06 2018-08-17 安徽华熊科技有限公司 A kind of reliable generation method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6703549B1 (en) * 1999-08-09 2004-03-09 Yamaha Corporation Performance data generating apparatus and method and storage medium
US6535462B1 (en) * 2001-05-15 2003-03-18 Hanpin Electron Co., Ltd. Digital sound-signal broadcaster
CN102610222A (en) * 2007-02-01 2012-07-25 缪斯亚米有限公司 Music transcription method, system and device
CN105161087A (en) * 2015-09-18 2015-12-16 努比亚技术有限公司 Automatic harmony method, device, and terminal automatic harmony operation method
CN105702249A (en) * 2016-01-29 2016-06-22 北京精奇互动科技有限公司 A method and apparatus for automatic selection of accompaniment
CN107301857A (en) * 2016-04-15 2017-10-27 青岛海青科创科技发展有限公司 A kind of method and system to melody automatically with accompaniment
CN108417190A (en) * 2018-03-06 2018-08-17 安徽华熊科技有限公司 A kind of reliable generation method and device

Also Published As

Publication number Publication date
CN109584845A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN106023969B (en) Method for applying audio effects to one or more tracks of a music compilation
US10600398B2 (en) Device and method for generating a real time music accompaniment for multi-modal music
JP3680749B2 (en) Automatic composer and automatic composition program
CN105989823B (en) Automatic following and shooting accompaniment method and device
US20140076125A1 (en) Adjustment of song length
US9286877B1 (en) Method and apparatus for computer-aided variation of music and other sequences, including variation by chaotic mapping
US11521585B2 (en) Method of combining audio signals
CN112382257B (en) Audio processing method, device, equipment and medium
CN108766407B (en) Audio connection method and device
US7411125B2 (en) Chord estimation apparatus and method
CN112289300B (en) Audio processing method and device, electronic equipment and computer readable storage medium
JP2008145564A (en) Automatic music arranging device and automatic music arranging program
CN109584845B (en) Automatic music distribution method and system, terminal and computer readable storage medium
JP6171393B2 (en) Acoustic synthesis apparatus and acoustic synthesis method
KR101800362B1 (en) Music composition support apparatus based on harmonics
CN111179890B (en) Voice accompaniment method and device, computer equipment and storage medium
JP2007011090A (en) Karaoke device
CN112825244B (en) Music audio generation method and device
CN113821189A (en) Audio playing method and device, terminal equipment and storage medium
CN115349147A (en) Sound signal generation method, estimation model training method, sound signal generation system, and program
JP4174950B2 (en) Music editing method and recording medium recording the method
KR20200014060A (en) Method for creating music note and providing music note
KR20200047198A (en) Apparatus and method for automatically composing music
US20090234475A1 (en) Process for managing digital audio streams
CN116343720B (en) Multi-sound part music score note grouping method, system, medium and computer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant