CN105161087A - Automatic harmony method, device, and terminal automatic harmony operation method - Google Patents

Automatic harmony method, device, and terminal automatic harmony operation method Download PDF

Info

Publication number
CN105161087A
CN105161087A CN201510601387.0A CN201510601387A CN105161087A CN 105161087 A CN105161087 A CN 105161087A CN 201510601387 A CN201510601387 A CN 201510601387A CN 105161087 A CN105161087 A CN 105161087A
Authority
CN
China
Prior art keywords
melody
note
sound
file
chord
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.)
Pending
Application number
CN201510601387.0A
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201510601387.0A priority Critical patent/CN105161087A/en
Publication of CN105161087A publication Critical patent/CN105161087A/en
Pending legal-status Critical Current

Links

Landscapes

  • Auxiliary Devices For Music (AREA)

Abstract

The invention discloses an automatic harmony method, which comprises steps: inputted sound signals are received, wherein the sound signals are sound signals generated when a musical instrument plays; the sound signals are recognized, a pitch and a length of each note are determined, bars are divided, and a rhythm file is generated; the rhythm file is analyzed, a weight is allocated to each note, and a chord progression corresponding to a bar is determined; and according to the chord progression and the length, a matching chord scheme is determined, and a harmony file is generated. The method and the device have the beneficial effects that the defect that when the traditional terminal is applied to harmony, the user needs to master a large amount of music basis can perform harmony can be solved. Harmony is automatically edited by the system, playability and interest of the user are enhanced, and user experience is enhanced.

Description

A kind of automatic and automatic harmony method of operating of method for acoustic, device and terminal
Technical field
The present invention relates to technical field of mobile terminals, more particularly, relate to automatically a kind of and the automatic harmony method of operating of method for acoustic, device and terminal.
Background technology
Harmony (Harmony), the combined acoustics that the sound that namely two or more is different is formed by sounding while of certain rule.It comprises: chord, is the basic material of harmony, and by more than 3 or 3 different sounds, according to three degree, stacked or additive method is bonded simultaneously, is its vertical structure; Harmony carries out, and each chord is interconnected, changes, and is its transversary.In the prior art, mainly utilize terminal applies, such as guitar chord dictionary, piano chord dictionary, allow user understand corresponding chord in the mode of tabling look-up.Aforesaid way needs user to have certain understanding to music foundation knowledge, need to understand current root sound and basic chord, just correct input can be carried out, to obtain correct result, be rather difficult to understand for domestic consumer and use, versatility is not good, can not know from experience the effect of harmony very intuitively.
Summary of the invention
The technical problem to be solved in the present invention is, for the above-mentioned defect of prior art, provides automatically a kind of and the automatic harmony method of operating of method for acoustic, device and terminal, domestic consumer can be made to experience the effect of automatic harmony.
A kind of automatic and method for acoustic, comprises step:
Receive the voice signal of input, the voice signal of described voice signal for producing during instrument playing;
Identify described voice signal, determine the pitch of each note and the duration of a sound and divide trifle, generating melody file;
Resolve described melody file, distribute weights by each note and determine the chord progression of corresponding trifle;
Determine to mate chord scheme according to described chord progression and the duration of a sound, and generate and sound file.
Alternatively, described generation melody file, comprising: the pitch and the duration of a sound that identify note in described voice signal, wherein,
Pitch refers to the frequency size of note;
The duration of a sound refers to the amplitude of note, is strong beat sound or weak beat sound according to duration of a sound determination note.
Alternatively, described parsing melody file comprises:
Analyze described melody according to preassigned beat and divide trifle;
Distribute weights to each note of described melody, and determine the mode of melody;
Distribute weights, mode and trifle information by each note of described melody to mate with the chord table set up in advance, determine chord progression.
Alternatively, described generation and sound file comprise:
Carry out judging that corresponding note is strong beat sound or weak beat sound according to the duration of a sound of note;
According to harmony theoretical foundation, based on the duration of a sound of note, with chord number for material, draw the chord scheme of described melody, and generate and sound file.
Alternatively, described generation chord scheme, comprising: carry out allocating harmony according to the pitch of each note of described melody and the duration of a sound of each note of correspondence.
Present invention also offers automatically a kind of and acoustic device, described device comprises:
Audio-frequency module, for receiving voice signal and the playing music of input;
Memory module, sets up chord in advance allocate database and melody file and sound file and music file for storing;
Chord module, for the melody file according to voice signal, determines chord scheme;
Compiling module, for working out harmony according to the string synthetic schemes mated and note duration.
Alternatively, described chord module also comprises:
Bar dividing unit, for analyzing the melody of described voice signal, and divides trifle according to the beat of specifying;
Melody analyzing unit, distributes weights for each note for melody, and determines that melody is large tune or ditty;
Chord selection unit, for determining according to each note distribution weights and trifle information the chord that each trifle is corresponding.
Alternatively, described device also comprises:
Display unit, to be connected with the sound levels line of the duration of a sound to be shown in terminal interface for melody file being illustrated as having pitch.
The invention allows for the method for operating of the automatic harmony of a kind of terminal, comprise step:
Receive the voice signal of input;
Identify described voice signal, produce the melody file corresponding to voice signal;
By analyze described melody file produce be applicable to described melody file and sound file;
By synthesizing described melody file and described and sound file generation music file, and play described music file.
Alternatively, described voice signal comprises:
Terminal passes through the melody of microphone records instrument playing as voice signal; Or
Terminal interface detect corresponding note is set touch or the melody that produces of pressing as voice signal.
Implement one of the present invention automatically and the automatic harmony method of operating of method for acoustic, device and terminal, there is following beneficial effect:
The theme that the musical instrument received according to terminal produces, generate corresponding and sound file, automatically harmony allocated to it and exports the music file after harmony, solving the user that the application programs such as traditional chord dictionary class need to be grasped a large amount of music foundations and just can carry out manual queries and carry out the drawback of harmony.Automatically allocate chord by system, can allow user directly experience chord add after effect, enhance user's playability and interest.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the hardware configuration schematic diagram of the mobile terminal realizing each embodiment of the present invention;
Fig. 2 is the automatic harmony method flow diagram that the embodiment of the present invention one provides;
Fig. 3 is the automatic harmony method flow diagram that the embodiment of the present invention two provides;
Fig. 4 is the oscillogram of piano performance one section " two tigers " melody that the embodiment of the present invention two provides;
Fig. 5 is the frequency plot of the parsing first note that the embodiment of the present invention two provides;
Fig. 6 is the histogram of piano performance one section " two tigers " melody that the embodiment of the present invention two provides;
Fig. 7 is the automatic and acoustic device block diagram that the embodiment of the present invention three provides;
Fig. 8 is the automatic harmony flow chart of terminal that the embodiment of the present invention four provides;
Fig. 9 gives the embodiment of the present invention preferably terminal effects schematic diagram;
Figure 10 gives the embodiment of the present invention preferably terminal effects schematic diagram.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
The mobile terminal realizing each embodiment of the present invention is described referring now to accompanying drawing.In follow-up description, use the suffix of such as " module ", " parts " or " unit " for representing element only in order to be conducive to explanation of the present invention, itself is specific meaning not.Therefore, " module " and " parts " can mixedly use.
Mobile terminal can be implemented in a variety of manners.Such as, the terminal described in the present invention can comprise the such as mobile terminal of mobile phone, smart phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP (portable media player), guider etc. and the fixed terminal of such as digital TV, desk-top computer etc.Below, suppose that terminal is mobile terminal.But it will be appreciated by those skilled in the art that except the element except being used in particular for mobile object, structure according to the embodiment of the present invention also can be applied to the terminal of fixed type.
Fig. 1 is the hardware configuration signal of the mobile terminal realizing each embodiment of the present invention.
Mobile terminal 100 can comprise wireless communication unit 110, A/V (audio/video) input block 120, user input unit 130, output unit 150, storer 160, interface unit 170, controller 180 and power supply unit 190 etc.Fig. 1 shows the mobile terminal with various assembly, it should be understood that, does not require to implement all assemblies illustrated.Can alternatively implement more or less assembly.Will be discussed in more detail below the element of mobile terminal.
Wireless communication unit 110 generally includes one or more assembly, and it allows the wireless communication between mobile terminal 100 and wireless communication system or network.Such as, wireless communication unit can comprise at least one in broadcast reception module 111, mobile communication module 112, wireless Internet module 113, short range communication module 114 and positional information module 115.
Broadcast reception module 111 via broadcast channel from external broadcasting management server receiving broadcast signal and/or broadcast related information.Broadcast channel can comprise satellite channel and/or terrestrial channel.Broadcast management server can be generate and send the server of broadcast singal and/or broadcast related information or the broadcast singal generated before receiving and/or broadcast related information and send it to the server of terminal.Broadcast singal can comprise TV broadcast singal, radio signals, data broadcasting signal etc.And broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast related information also can provide via mobile communications network, and in this case, broadcast related information can be received by mobile communication module 112.Broadcast singal can exist in a variety of manners, such as, it can exist with the form of the electronic service guidebooks (ESG) of the electronic program guides of DMB (DMB) (EPG), digital video broadcast-handheld (DVB-H) etc.Broadcast reception module 111 can by using the broadcast of various types of broadcast system Received signal strength.Especially, broadcast reception module 111 can by using such as multimedia broadcasting-ground (DMB-T), DMB-satellite (DMB-S), digital video broadcasting-hand-held (DVB-H), and the digit broadcasting system of the Radio Data System, received terrestrial digital broadcasting integrated service (ISDB-T) etc. of forward link media (MediaFLO) receives digital broadcasting.Broadcast reception module 111 can be constructed to be applicable to providing the various broadcast system of broadcast singal and above-mentioned digit broadcasting system.The broadcast singal received via broadcast reception module 111 and/or broadcast related information can be stored in storer 160 (or storage medium of other type).
Radio signal is sent at least one in base station (such as, access point, Node B etc.), exterior terminal and server and/or receives radio signals from it by mobile communication module 112.Various types of data that such radio signal can comprise voice call signal, video calling signal or send according to text and/or Multimedia Message and/or receive.
Wireless Internet module 113 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.This module can be inner or be externally couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by this module can comprise WLAN (WLAN) (Wi-Fi), Wibro (WiMAX), Wimax (worldwide interoperability for microwave access), HSDPA (high-speed downlink packet access) etc.
Short range communication module 114 is the modules for supporting junction service.Some examples of short-range communication technology comprise bluetooth TM, radio-frequency (RF) identification (RFID), Infrared Data Association (IrDA), ultra broadband (UWB), purple honeybee TM etc.
Positional information module 115 is the modules of positional information for checking or obtain mobile terminal.The typical case of positional information module is GPS (GPS).According to current technology, GPS module 115 calculates from the range information of three or more satellite and correct time information and for the Information application triangulation calculated, thus calculates three-dimensional current location information according to longitude, latitude and pin-point accuracy.Current, the method for calculating position and temporal information uses three satellites and by using the error of the position that goes out of an other satellite correction calculation and temporal information.In addition, GPS module 115 can carry out computing velocity information by Continuous plus current location information in real time.
A/V input block 120 is for audio reception or vision signal.A/V input block 120 can comprise camera 121 and microphone 1220, and the view data of camera 121 to the static images obtained by image capture apparatus in Video Capture pattern or image capture mode or video processes.Picture frame after process may be displayed on display module 151.Picture frame after camera 121 processes can be stored in storer 160 (or other storage medium) or via wireless communication unit 110 and send, and can provide two or more cameras 1210 according to the structure of mobile terminal.Such acoustic processing can via microphones sound (voice data) in telephone calling model, logging mode, speech recognition mode etc. operational mode, and can be voice data by microphone 122.Audio frequency (voice) data after process can be converted to the formatted output that can be sent to mobile communication base station via mobile communication module 112 when telephone calling model.Microphone 122 can be implemented various types of noise and eliminate (or suppress) algorithm and receiving and sending to eliminate (or suppression) noise or interference that produce in the process of sound signal.
User input unit 130 can generate key input data to control the various operations of mobile terminal according to the order of user's input.User input unit 130 allows user to input various types of information, and keyboard, the young sheet of pot, touch pad (such as, detecting the touch-sensitive assembly of the change of the resistance, pressure, electric capacity etc. that cause owing to being touched), roller, rocking bar etc. can be comprised.Especially, when touch pad is superimposed upon on display module 151 as a layer, touch-screen can be formed.
Interface unit 170 is used as at least one external device (ED) and is connected the interface that can pass through with mobile terminal 100.Such as, external device (ED) can comprise wired or wireless head-band earphone port, external power source (or battery charger) port, wired or wireless FPDP, memory card port, for connecting the port, audio frequency I/O (I/O) port, video i/o port, ear port etc. of the device with identification module.Identification module can be that storage uses the various information of mobile terminal 100 for authentication of users and can comprise subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) etc.In addition, the device (hereinafter referred to " recognition device ") with identification module can take the form of smart card, and therefore, recognition device can be connected with mobile terminal 100 via port or other coupling arrangement.Interface unit 170 may be used for receive from external device (ED) input (such as, data message, electric power etc.) and the input received be transferred to the one or more element in mobile terminal 100 or may be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connected with external base, interface unit 170 can be used as to allow by it electric power to be provided to the path of mobile terminal 100 from base or can be used as the path that allows to be transferred to mobile terminal by it from the various command signals of base input.The various command signal inputted from base or electric power can be used as and identify whether mobile terminal is arranged on the signal base exactly.Output unit 150 is constructed to provide output signal (such as, sound signal, vision signal, alarm signal, vibration signal etc.) with vision, audio frequency and/or tactile manner.Output unit 150 can comprise display module 151, dio Output Modules 152, alarm modules 153 etc.
Display module 151 may be displayed on the information of process in mobile terminal 100.Such as, when mobile terminal 100 is in telephone calling model, display module 151 can show with call or other communicate (such as, text messaging, multimedia file are downloaded etc.) be correlated with user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling pattern or image capture mode, display module 151 can the image of display capture and/or the image of reception, UI or GUI that video or image and correlation function are shown etc.
Meanwhile, when display module 151 and touch pad as a layer superposed on one another to form touch-screen time, display module 151 can be used as input media and output unit.Display module 151 can comprise at least one in liquid crystal display (LCD), thin film transistor (TFT) LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc.Some in these displays can be constructed to transparence and watch from outside to allow user, and this can be called transparent display, and typical transparent display can be such as TOLED (transparent organic light emitting diode) display etc.According to the specific embodiment wanted, mobile terminal 100 can comprise two or more display modules (or other display device), such as, mobile terminal can comprise outside display module (not shown) and inner display module (not shown).Touch-screen can be used for detecting touch input pressure and touch input position and touch and inputs area.
When dio Output Modules 152 can be under the isotypes such as call signal receiving mode, call mode, logging mode, speech recognition mode, broadcast reception mode at mobile terminal, voice data convert audio signals that is that wireless communication unit 110 is received or that store in storer 160 and exporting as sound.And dio Output Modules 152 can provide the audio frequency relevant to the specific function that mobile terminal 100 performs to export (such as, call signal receives sound, message sink sound etc.).Dio Output Modules 152 can comprise loudspeaker, hummer etc.
Alarm modules 153 can provide and export that event informed to mobile terminal 100.Typical event can comprise calling reception, message sink, key signals input, touch input etc.Except audio or video exports, alarm modules 153 can provide in a different manner and export with the generation of notification event.Such as, alarm modules 153 can provide output with the form of vibration, when receive calling, message or some other enter communication (incomingcommunication) time, alarm modules 153 can provide sense of touch to export (that is, vibrating) to notify to user.By providing such sense of touch to export, even if when the mobile phone of user is in the pocket of user, user also can identify the generation of various event.Alarm modules 153 also can provide the output of the generation of notification event via display module 151 or dio Output Modules 152.
Storer 160 software program that can store process and the control operation performed by controller 180 etc., or temporarily can store oneself through exporting the data (such as, telephone directory, message, still image, video etc.) that maybe will export.And, storer 160 can store about when touch be applied to touch-screen time the vibration of various modes that exports and the data of sound signal.
Storer 160 can comprise the storage medium of at least one type, described storage medium comprises flash memory, hard disk, multimedia card, card-type storer (such as, SD or DX storer etc.), random access storage device (RAM), static random-access memory (SRAM), ROM (read-only memory) (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc.And mobile terminal 100 can be connected the memory function of execute store 160 network storage device with by network cooperates.
Controller 180 controls the overall operation of mobile terminal usually.Such as, controller 180 performs the control relevant to voice call, data communication, video calling etc. and process.In addition, controller 180 can comprise the multi-media module 1810 for reproducing (or playback) multi-medium data, and multi-media module 1810 can be configured in controller 180, or can be configured to be separated with controller 180.Controller 180 can pattern recognition process, is identified as character or image so that input is drawn in the handwriting input performed on the touchscreen or picture.
Power supply unit 190 receives external power or internal power and provides each element of operation and the suitable electric power needed for assembly under the control of controller 180.
Various embodiment described herein can to use such as computer software, the computer-readable medium of hardware or its any combination implements.For hardware implementation, embodiment described herein can by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, being designed at least one performed in the electronic unit of function described herein and implementing, in some cases, such embodiment can be implemented in controller 180.For implement software, the embodiment of such as process or function can be implemented with allowing the independent software module performing at least one function or operation.Software code can be implemented by the software application (or program) write with any suitable programming language, and software code can be stored in storer 160 and to be performed by controller 180.
So far, oneself is through the mobile terminal according to its functional description.Below, for the sake of brevity, by the slide type mobile terminal that describes in various types of mobile terminals of such as folded form, board-type, oscillating-type, slide type mobile terminal etc. exemplarily.Therefore, the present invention can be applied to the mobile terminal of any type, and is not limited to slide type mobile terminal.
Below music terms relevant in harmony method is introduced:
Harmony: music develops into multi part by monophonic, single melody forms the lateral aspects of sound, and harmony then represents vertical aspect.Harmony, melody and rhythm are the three elements of music.Harmony, as the accompaniment of melody, can play the effect setting off and strengthen expressive force, makes audio effect abundant, full, enhances artistic expression and the appeal of music.
Chord, chord is a concept of music theory, refers to one group of sound of certain interval relation.By more than three or three sounds, by three degree of stacked relations, combined in the vertical, just become chord.Usually the concepts such as common chords (chords of three sounds), seventh chord (chords of four sounds), ten common chords are had.
Mode, in music, the many sounds (being generally no more than seven) linked together according to certain relation, form an individual system, and centered by a sound (keynote), this individual system are just called mode.Mode is divided into major mode and minor, major mode with movable do do for keynote, minor with movable do la for keynote.
Chord series expression: with series expression chord.With reference to table 1, as C adjusts one-level chord to be C chord, secondary chord is Dm chord, and three grades of chords are Em chords, and level Four chord is F chord, and Pyatyi chord is G chord, and six grades of chords are Am chords.
Table 1
Tonality, tonality refers to the accurate pitch position at certain mode place.
Staff stave start to see the lifting mark before writing on bat.These marks are the accurate pitches representing melody, " tonality " of namely music.Exactly, it refers to the keynote position of each mode.What tonality referred to is exactly 24 large ditties.
In order to there be understanding clearly to technical characteristic of the present invention, object and effect, now contrast accompanying drawing and describe the specific embodiment of the present invention in detail.
Embodiment one
Embodiments of the invention are by providing automatically a kind of and method for acoustic, solve in prior art and can not experience the defect with sound effective value better because music foundation is not understood by domestic consumer, described method can be used in the application scenarioss such as music editor, musical instrument harmony, terminal can automatically be allocated chord to the voice signal of user's input and complete harmony, promotes Consumer's Experience.
Show the method flow diagram of the embodiment of the present invention see Fig. 2, Fig. 2, comprise the following steps:
Step S101, receives the voice signal of input.
In one embodiment, after user starts harmony application program, terminal starts to receive voice signal by microphone, the voice signal of voice signal for producing during instrument playing.
Step S102, identifies described voice signal, determines the pitch of each note and the duration of a sound and divides trifle, generating melody file.
In one embodiment, voice signal is converted to the waveform of time-domain signal, determine the duration of a sound of each note; Again time-domain signal is obtained frequency-region signal through time-frequency conversion, determine the pitch of each note; Analyze described melody according to preassigned beat and divide trifle, thus producing the melody file corresponding to voice signal, melody file comprises pitch and the duration of a sound of note.
Step S103, resolves described melody file, distributes weights and determine the chord progression of corresponding trifle by each note.
In one embodiment, weights are distributed to each note of described melody, each trifle the Ith grade of total value to the VIth grade of chord is gone out according to the weight computing of each note, such as: the formation of I grade of chord is 135, so drawing total value by occurring in trifle that the weights of note 135 are added, calculating the total value of each trifle difference chord at different levels thus.According to the chord progression of the corresponding trifle of the determination that total value is maximum.
And determine the mode of melody; Distribute weights, mode and trifle information by each note of described melody to mate with the chord table set up in advance, determine chord scheme.
Step 104, determines to mate chord scheme according to described chord progression and the duration of a sound, and generates and sound file.
In one embodiment, carry out judging that corresponding note is strong beat sound or weak beat sound according to the duration of a sound of note; According to harmony theoretical foundation, based on the duration of a sound of note, with chord number for material, draw the chord scheme of described melody, and generate and sound file.
In one embodiment, the chord table set up in advance at least should comprise the mapping relations between chord, chord progression and chord constituting tone, in table 1.
The terminal of the embodiment of the present invention can be the mobile terminal 100 shown in above-mentioned Fig. 1.
The one proposed based on the embodiment of the present invention automatically and method for acoustic, after user inputs the theme that instrument playing produces, terminal produces corresponding melody and sound file.Therefore, also can art music easily for the user not having a music theory basis, experience and sound effective value.
Embodiment two
The invention provides a kind of automatically and method for acoustic, show one section of piano melody of the embodiment of the present invention with reference to Fig. 3, Fig. 3 and method for acoustic.
Step S201, records to the melody of piano performance.
In one embodiment, piano performance one section of melody, terminal, by microphones voice signal, is recorded to piano performance melody, and is preserved melody file.
Step S202, identifies piano performance melody, carries out the note analysis of melody.
In one embodiment, terminal is resolved to time domain signal waveform after obtaining melody file, shows the oscillogram of piano performance one section " two tigers " melody with reference to Fig. 4, Fig. 4.Horizontal axis representing time, the longitudinal axis represents amplitude.Because waveform is laterally zygomorphic, only get the positive summit of original waveform, then do linear interpolation processing to it, will generate a smoother envelope, and then get the summit of this envelope, above step for several times repeatedly, extracts summit now.The summit of different note is discrepant, and the summit of identical note is consistent.So each note to be extracted from audio frequency the parsing just can carrying out pitch (frequency), rhythm (value), tone color (harmonic components).
Judge that the duration of a sound of note can according to sample frequency, and the number of sampled point in current note range of waveforms calculates the duration of a sound, judges " minim ", " crotchet ", " quaver " and " whole note " etc. with this.
In one embodiment, judge that the pitch of note is by Fast Fourier Transform (FFT), carry out the conversion of time domain to frequency domain.But the joining place of last note and a rear note can have impact to the pitch of this note (frequency), a part of waveform that therefore should intercept in the middle of this note carries out spectrum analysis.
When resolving the frequency spectrum of each note, by extracting section comparatively stable in the waveform of each sound out, get rid of the waveform signal at two ends, and remove noise.According to twelve-tone equal temperament, the ratio of the vibration number between each adjacent two rules is completely equal, two notes adjacent in the oscillogram drawn also must meet this relation, due to can noise be produced in recording process, and the resonance of other strings, the especial sound of piano struck string mechanism can be mixed into, also need to do Fuzzy Processing to the waveform of each note.Namely the waveform of each note allows to there is certain fluctuation range.
After Fast Fourier Transform (FFT), the frequency of corresponding note can be obtained.Show the frequency plot in above-mentioned melody after first note Fast Fourier Transform (FFT) with reference to Fig. 5, Fig. 5, the frequency size of note is 260.43.Hz, and carrying out mating according to chord table the frequency obtaining central C on piano is 261.6Hz, finally determines that note is do.
Show the histogram of above-mentioned melody with reference to Fig. 6, Fig. 6, frequency size corresponding from figure, the analysis result that just can obtain above-mentioned melody is: 12311231345345.
Step S203, the trifle according to composition melody is selected the chord for each trifle.
In one embodiment, analyze described melody according to preassigned beat and divide trifle; Distribute weights to each note of described melody, and determine the mode of melody; Distribute weights, mode and trifle information by each note of described melody to mate with the chord table set up in advance, determine chord scheme.
In above-mentioned melody, for the first trifle, the power according to note each in harmony theory calculate 1231:
The weights of note 1 are 50, and the weights of note 2 are 30, and the weights of note 3 are 20.
According to above-mentioned calculating total value size, determine that the chord progression of the first trifle is configured to one-level chord and six grades of chords.
The note of middle forte is 13, and note 1 is also simultaneously off beat, then according to complete trifle disclose tonality, determine that the first trifle is main common chords.
Step S204, the duration of a sound of the pitch determined according to each note and each note of correspondence allocates harmony.
In one embodiment, after obtaining thematic pitch data, chord source of sound storehouse is called according to scheme and theme duration, carry out chord synthesis, final generation and sound file are play for user, mapping relations between the chord table chord set up in advance, chord progression and chord constituting tone, in table 1.
For the first trifle in above-mentioned melody, in 1231, the note of forte is 13, and note 1 is also simultaneously off beat, then according to complete trifle disclose tonality, and chord scheme carries out allocating harmony.
Due to can noise be produced in Recording Process, and the resonance of other strings, the especial sound of piano struck string mechanism can be mixed into, also need to do Fuzzy Processing to the waveform of each note.Namely the waveform of each note allows to there is certain fluctuation range.According to twelve-tone equal temperament, the ratio of the vibration number between each adjacent two rules is completely equal, and two notes adjacent in the oscillogram that we draw also must meet this relation, by extracting section comparatively stable in the waveform of each sound out, get rid of the waveform signal at two ends, and remove noise.
The terminal of the embodiment of the present invention can be the mobile terminal 100 shown in above-mentioned Fig. 1.
The one proposed based on the embodiment of the present invention automatically and acoustic device, after user inputs the theme that instrument playing produces, terminal produces corresponding melody and sound file.Therefore, also can art music easily for the user not having a music theory basis, experience and sound effective value.
Embodiment three
The invention provides automatically a kind of and acoustic device, Fig. 7 shows the apparatus structure block diagram of the embodiment of the present invention, comprises audio-frequency module 10, memory module 20, chord module 30, compiling module 40.
Audio-frequency module 10, for receiving voice signal and the playing music of input.
In one embodiment, after starting harmony application program, the voice signal that terminal is inputted by microphones user; According to the voice signal of user's input produce corresponding with sound file after play and sound file, or play the music file after harmony.
Memory module 20, sets up chord in advance allocate database and melody file and sound file and music file for storing.
In one embodiment, set up chord allocate database by lookup table mode, the table of database embodies the mapping relations between chord, chord progression and chord constituting tone, in table 1.After the voice signal of terminal recognition user input, the melody file of generation is stored in memory module; What produce after chord module determination chord scheme is stored in storage square with sound file; Produce music file by synthesis melody file and described and sound file and be stored in memory module.
Chord module 30, for the melody file according to voice signal, determines chord scheme.
In one embodiment, analyze described melody according to preassigned beat and divide trifle; Distribute weights to each note of described melody, and determine the mode of melody; Distribute weights, mode and trifle information by each note of described melody to mate with the chord table set up in advance, determine chord scheme.Chord module 30 also comprises:
Bar dividing unit 31, for analyzing the melody of described voice signal, and divides trifle according to the beat of specifying.
Melody analyzing unit 32, distributes weights for each note for melody, and determines that melody is large tune or ditty.
Chord selection unit 33, for determining according to each note distribution weights and trifle information the chord that each trifle is corresponding.
Compiling module 40, for working out harmony according to the string synthetic schemes mated and note duration.
In one embodiment, the chord scheme that compiling module 40 is determined according to chord module 30 and the duration of a sound corresponding to each note carry out establishment harmony, generation be stored in memory module 20 with sound file.
The terminal of the embodiment of the present invention can be the mobile terminal 100 shown in above-mentioned Fig. 1.
The one proposed based on the embodiment of the present invention automatically and acoustic device, after user inputs the theme that instrument playing produces, terminal produces corresponding melody and sound file.Therefore, also can art music easily for the user not having a music theory basis, experience and sound effective value.
Embodiment four
The invention provides the automatic harmony method of operating of a kind of terminal, Fig. 8 shows the automatic harmony flow chart of a kind of terminal that the embodiment of the present invention provides, Fig. 9 and Figure 10 gives the embodiment of the present invention preferably terminal effects schematic diagram.
Step S401, receives the voice signal of input.
In one embodiment, after user starts harmony application program, terminal starts to receive voice signal by microphone, the voice signal that the theme that voice signal is instrument playing produces, with reference to Fig. 9.Terminal interface detect corresponding note is set touch or the melody that produces of pressing as voice signal, with reference to Figure 10.
Step S402, identifies described voice signal, produces the melody file corresponding to voice signal.
In one embodiment, voice signal is converted to the waveform of time-domain signal, determine that each note is the duration of a sound; Again time-domain signal is obtained frequency-region signal through time-frequency conversion, determine the pitch of each note, thus produce the melody file corresponding to voice signal, melody file comprises pitch and the duration of a sound of note.
Step S403, by analyze described melody file produce be applicable to described melody file and sound file.
In one embodiment, analyze described melody according to preassigned beat and divide trifle; Distribute weights to each note of described melody, and determine the mode of melody; Distribute weights, mode and trifle information by each note of described melody to mate with the chord table set up in advance, determine chord scheme.Carry out allocating harmony according to the duration of a sound of the described chord scheme determined and each note again.
Step S404, produces music file by synthesis melody file with sound file, and playing music.
In one embodiment, after obtaining theme data, according to allocating according to chord the database that theory establishes, using look-up table, searching database, determine chord scheme, call chord source of sound storehouse according to scheme and theme duration, carry out chord synthesis, and a music file will be synthesized with sound file and melody file, play for user, show current chord name at terminal interface simultaneously.
The terminal of the embodiment of the present invention can be the mobile terminal 100 shown in above-mentioned Fig. 1.
Based on the automatic harmony method of operating of a kind of terminal that the embodiment of the present invention proposes, after user inputs the theme that instrument playing produces, terminal produces corresponding melody and sound file.User user selects to play and sound file, or by melody file and harmony file synthesis, plays new music file.Therefore, also can art music easily for the user not having a music theory basis, experience and sound effective value, user is also by terminal interface (such as, piano key) input melody and carry out harmony, experience the single theme of musical instrument to the final process generating multistage chord melody.
By reference to the accompanying drawings embodiments of the invention are described above; but the present invention is not limited to above-mentioned embodiment; above-mentioned embodiment is only schematic; instead of it is restrictive; those of ordinary skill in the art is under enlightenment of the present invention; do not departing under the ambit that present inventive concept and claim protect, also can make a lot of form, these all belong within protection of the present invention.

Claims (10)

1. an automatic and method for acoustic, is characterized in that, comprise step:
Receive the voice signal of input, the voice signal of described voice signal for producing during instrument playing;
Identify described voice signal, determine the pitch of each note and the duration of a sound and divide trifle, generating melody file;
Resolve described melody file, distribute weights by each note and determine the chord progression of corresponding trifle;
Determine to mate chord scheme according to described chord progression and the duration of a sound, and generate and sound file.
2. automatic and method for acoustic according to claim 1, it is characterized in that, described generation melody file, comprising: the pitch and the duration of a sound that identify note in described voice signal, wherein,
Pitch refers to the frequency size of note;
The duration of a sound refers to the amplitude of note, is strong beat sound or weak beat sound according to duration of a sound determination note.
3. automatic and method for acoustic according to claim 1, it is characterized in that, described parsing melody file comprises:
Analyze described melody according to preassigned beat and divide trifle;
Distribute weights to each note of described melody, and determine the mode of melody;
Distribute weights, mode and trifle information by each note of described melody to mate with the chord table set up in advance, determine chord progression.
4. automatic and method for acoustic according to claim 3, it is characterized in that, described generation and sound file comprise:
Carry out judging that corresponding note is strong beat sound or weak beat sound according to the duration of a sound of note;
According to harmony theoretical foundation, based on the duration of a sound of note, with chord number for material, draw the chord scheme of described melody, and generate and sound file.
5. the automatic and method for acoustic according to any one of Claims 1-4, it is characterized in that, described generation chord scheme, comprising: carry out allocating harmony according to the pitch of each note of described melody and the duration of a sound of each note of correspondence.
6. an automatic and acoustic device, it is characterized in that, described device comprises:
Audio-frequency module, for receiving voice signal and the playing music of input;
Memory module, sets up chord in advance allocate database and melody file and sound file and music file for storing;
Chord module, for the melody file according to voice signal, determines chord scheme;
Compiling module, for working out harmony according to the string synthetic schemes mated and note duration.
7. automatic and acoustic device according to claim 6, it is characterized in that, described chord module also comprises:
Bar dividing unit, for analyzing the melody of described voice signal, and divides trifle according to the beat of specifying;
Melody analyzing unit, distributes weights for each note for melody, and determines that melody is large tune or ditty;
Chord selection unit, for determining according to each note distribution weights and trifle information the chord that each trifle is corresponding.
8. automatic and acoustic device according to claim 6, it is characterized in that, described device also comprises:
Display unit, to be connected with the sound levels line of the duration of a sound to be shown in terminal interface for melody file being illustrated as having pitch.
9. a method of operating for the automatic harmony of terminal, is characterized in that, comprise step:
Receive the voice signal of input;
Identify described voice signal, produce the melody file corresponding to voice signal;
By analyze described melody file produce be applicable to described melody file and sound file;
By synthesizing described melody file and described and sound file generation music file, and play described music file.
10. automatic harmony method of operating according to claim 9, it is characterized in that, described voice signal comprises:
Terminal passes through the melody of microphone records instrument playing as voice signal; Or
Terminal interface detect corresponding note is set touch or the melody that produces of pressing as voice signal.
CN201510601387.0A 2015-09-18 2015-09-18 Automatic harmony method, device, and terminal automatic harmony operation method Pending CN105161087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510601387.0A CN105161087A (en) 2015-09-18 2015-09-18 Automatic harmony method, device, and terminal automatic harmony operation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510601387.0A CN105161087A (en) 2015-09-18 2015-09-18 Automatic harmony method, device, and terminal automatic harmony operation method

Publications (1)

Publication Number Publication Date
CN105161087A true CN105161087A (en) 2015-12-16

Family

ID=54801920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510601387.0A Pending CN105161087A (en) 2015-09-18 2015-09-18 Automatic harmony method, device, and terminal automatic harmony operation method

Country Status (1)

Country Link
CN (1) CN105161087A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105761713A (en) * 2016-01-29 2016-07-13 北京精奇互动科技有限公司 Chord changing processing method and device
CN105845115A (en) * 2016-03-16 2016-08-10 腾讯科技(深圳)有限公司 Song mode determining method and song mode determining device
CN106098058A (en) * 2016-06-23 2016-11-09 腾讯科技(深圳)有限公司 Tone line generates method and apparatus
CN106205572A (en) * 2016-06-28 2016-12-07 海信集团有限公司 Sequence of notes generates method and device
CN106504731A (en) * 2016-09-27 2017-03-15 安徽克洛斯威智能乐器科技有限公司 Based on the intelligent piano system that Voice command is recorded comprehensively
CN106782460A (en) * 2016-12-26 2017-05-31 广州酷狗计算机科技有限公司 The method and apparatus for generating music score
CN107301857A (en) * 2016-04-15 2017-10-27 青岛海青科创科技发展有限公司 A kind of method and system to melody automatically with accompaniment
CN107871488A (en) * 2016-09-28 2018-04-03 卡西欧计算机株式会社 Chord decision maker, chord decision method and non-transitory recording medium
CN109545177A (en) * 2019-01-04 2019-03-29 平安科技(深圳)有限公司 A kind of melody is dubbed in background music method and device
CN109584845A (en) * 2018-11-16 2019-04-05 平安科技(深圳)有限公司 Automatic dub in background music method and system, terminal and computer readable storage medium
CN109841203A (en) * 2019-01-25 2019-06-04 得理乐器(珠海)有限公司 A kind of electronic musical instrument music harmony determines method and system
CN110930970A (en) * 2019-12-03 2020-03-27 上海观池文化传播有限公司 Music chord generating device and method based on signal triggering
CN112075089A (en) * 2018-04-30 2020-12-11 比特斯宁公司 Vibration system using sound
CN112825244A (en) * 2019-11-21 2021-05-21 阿里巴巴集团控股有限公司 Dubbing music audio generation method and apparatus
WO2021218158A1 (en) * 2020-04-30 2021-11-04 平安科技(深圳)有限公司 Harmony matching method and apparatus, electronic device, and computer readable medium
CN113744763A (en) * 2021-08-18 2021-12-03 北京达佳互联信息技术有限公司 Method and device for determining similar melody
CN115379042A (en) * 2021-05-18 2022-11-22 北京小米移动软件有限公司 Ringtone generation method and device, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6951977B1 (en) * 2004-10-11 2005-10-04 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Method and device for smoothing a melody line segment
CN101203904A (en) * 2005-04-18 2008-06-18 Lg电子株式会社 Operating method of a music composing device
CN102063292A (en) * 2009-11-18 2011-05-18 华为技术有限公司 Harmony compiling method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6951977B1 (en) * 2004-10-11 2005-10-04 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Method and device for smoothing a melody line segment
CN101203904A (en) * 2005-04-18 2008-06-18 Lg电子株式会社 Operating method of a music composing device
CN102063292A (en) * 2009-11-18 2011-05-18 华为技术有限公司 Harmony compiling method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姜秦丰: "《乐理教程》", 31 August 2014, 西南师范大学出版社 *

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105761713A (en) * 2016-01-29 2016-07-13 北京精奇互动科技有限公司 Chord changing processing method and device
CN105845115A (en) * 2016-03-16 2016-08-10 腾讯科技(深圳)有限公司 Song mode determining method and song mode determining device
CN105845115B (en) * 2016-03-16 2021-05-07 腾讯科技(深圳)有限公司 Song mode determining method and song mode determining device
CN107301857A (en) * 2016-04-15 2017-10-27 青岛海青科创科技发展有限公司 A kind of method and system to melody automatically with accompaniment
CN106098058A (en) * 2016-06-23 2016-11-09 腾讯科技(深圳)有限公司 Tone line generates method and apparatus
CN106098058B (en) * 2016-06-23 2018-09-07 腾讯科技(深圳)有限公司 Tone line generation method and device
CN106205572B (en) * 2016-06-28 2019-09-20 海信集团有限公司 Sequence of notes generation method and device
CN106205572A (en) * 2016-06-28 2016-12-07 海信集团有限公司 Sequence of notes generates method and device
CN106504731A (en) * 2016-09-27 2017-03-15 安徽克洛斯威智能乐器科技有限公司 Based on the intelligent piano system that Voice command is recorded comprehensively
CN107871488B (en) * 2016-09-28 2021-12-31 卡西欧计算机株式会社 Chord decision device, chord decision method, and non-transitory recording medium
CN107871488A (en) * 2016-09-28 2018-04-03 卡西欧计算机株式会社 Chord decision maker, chord decision method and non-transitory recording medium
CN106782460A (en) * 2016-12-26 2017-05-31 广州酷狗计算机科技有限公司 The method and apparatus for generating music score
CN106782460B (en) * 2016-12-26 2018-10-30 广州酷狗计算机科技有限公司 The method and apparatus for generating music score
CN112075089A (en) * 2018-04-30 2020-12-11 比特斯宁公司 Vibration system using sound
US11323814B2 (en) 2018-04-30 2022-05-03 Beatsnine Inc. Vibration system using sound
CN109584845A (en) * 2018-11-16 2019-04-05 平安科技(深圳)有限公司 Automatic dub in background music method and system, terminal and computer readable storage medium
CN109584845B (en) * 2018-11-16 2023-11-03 平安科技(深圳)有限公司 Automatic music distribution method and system, terminal and computer readable storage medium
CN109545177A (en) * 2019-01-04 2019-03-29 平安科技(深圳)有限公司 A kind of melody is dubbed in background music method and device
CN109545177B (en) * 2019-01-04 2023-08-22 平安科技(深圳)有限公司 Melody matching method and device
CN109841203A (en) * 2019-01-25 2019-06-04 得理乐器(珠海)有限公司 A kind of electronic musical instrument music harmony determines method and system
CN109841203B (en) * 2019-01-25 2021-01-26 得理乐器(珠海)有限公司 Electronic musical instrument music harmony determination method and system
CN112825244A (en) * 2019-11-21 2021-05-21 阿里巴巴集团控股有限公司 Dubbing music audio generation method and apparatus
CN112825244B (en) * 2019-11-21 2024-04-12 阿里巴巴集团控股有限公司 Music audio generation method and device
CN110930970A (en) * 2019-12-03 2020-03-27 上海观池文化传播有限公司 Music chord generating device and method based on signal triggering
CN110930970B (en) * 2019-12-03 2023-12-05 上海观池文化传播有限公司 Music chord generating device and method based on signal triggering
WO2021218158A1 (en) * 2020-04-30 2021-11-04 平安科技(深圳)有限公司 Harmony matching method and apparatus, electronic device, and computer readable medium
CN115379042A (en) * 2021-05-18 2022-11-22 北京小米移动软件有限公司 Ringtone generation method and device, terminal and storage medium
CN113744763A (en) * 2021-08-18 2021-12-03 北京达佳互联信息技术有限公司 Method and device for determining similar melody
CN113744763B (en) * 2021-08-18 2024-02-23 北京达佳互联信息技术有限公司 Method and device for determining similar melodies

Similar Documents

Publication Publication Date Title
CN105161087A (en) Automatic harmony method, device, and terminal automatic harmony operation method
US10770050B2 (en) Audio data processing method and apparatus
CN105740394A (en) Music generation method, terminal, and server
CN111402843B (en) Rap music generation method and device, readable medium and electronic equipment
CN105810211A (en) Audio frequency data processing method and terminal
CN101454778B (en) A method and apparatus for accessing an audio file from a collection of audio files using tonal matching
CN104657438A (en) Information processing method and electronic equipment
CN108831437A (en) A kind of song generation method, device, terminal and storage medium
US20210027800A1 (en) Method for processing audio, electronic device and storage medium
CN105118523A (en) Audio processing method and device
CN111445897A (en) Song generation method and device, readable medium and electronic equipment
CN105513607A (en) Method and apparatus for music composition and lyric writing
CN106205571A (en) A kind for the treatment of method and apparatus of singing voice
US20230402047A1 (en) Audio processing method and apparatus, electronic device, and computer-readable storage medium
CN107767850A (en) A kind of singing marking method and system
CN106328176A (en) Method and device for generating song audio
US9882658B2 (en) Communicating data with audible harmonies
KR101813704B1 (en) Analyzing Device and Method for User's Voice Tone
KR20170106165A (en) Method and electronic apparatus for providing music information
CN109410972A (en) Generate the method, apparatus and storage medium of sound effect parameters
JP2016085309A (en) Musical sound estimation device and program
WO2023061330A1 (en) Audio synthesis method and apparatus, and device and computer-readable storage medium
CN105976802A (en) Music automatic generation system based on machine learning technology
CN102760051A (en) Method for obtaining voice signal and electronic equipment
CN108763521A (en) The method and apparatus for storing lyrics phonetic notation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20151216

RJ01 Rejection of invention patent application after publication