[go: up one dir, main page]

CN106384603A - Music play method and music play device - Google Patents

Music play method and music play device Download PDF

Info

Publication number
CN106384603A
CN106384603A CN201610872623.7A CN201610872623A CN106384603A CN 106384603 A CN106384603 A CN 106384603A CN 201610872623 A CN201610872623 A CN 201610872623A CN 106384603 A CN106384603 A CN 106384603A
Authority
CN
China
Prior art keywords
music
characteristic vector
play parameter
play
audio file
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
CN201610872623.7A
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.)
Sichuan Jiuzhou Electric Group Co Ltd
Original Assignee
Sichuan Jiuzhou Electric Group 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 Sichuan Jiuzhou Electric Group Co Ltd filed Critical Sichuan Jiuzhou Electric Group Co Ltd
Priority to CN201610872623.7A priority Critical patent/CN106384603A/en
Publication of CN106384603A publication Critical patent/CN106384603A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store
    • G11C7/16Storage of analogue signals in digital stores using an arrangement comprising analogue/digital [A/D] converters, digital memories and digital/analogue [D/A] converters 
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Reverberation, Karaoke And Other Acoustics (AREA)

Abstract

The present invention discloses a music play method and a music play device. The method comprises the steps of dividing a first audio file into N music clips according to a preset rule, wherein the preset rule specifically refers to a preset duration or a preset size, and N is an integer greater than or equal to 2; extracting a feature vector of each music clip of the N music clips, and acquiring N feature vectors; determining a play parameter corresponding to each feature vector of the N feature vectors, and acquiring N groups of play parameter; and playing the first audio file according to the N groups of play parameter. Through adoption of the method and device, a technical problem in the prior art that a speaker has a single music play manner is solved. According to the method, the audio file is divided into multiple music clips, and each music clip is matched with corresponding play parameter so as to play the audio file, so that the music play manner is increased.

Description

A kind of method for playing music and music player devices
Technical field
The present invention relates to electronic technology field, particularly to a kind of method for playing music and music player devices.
Background technology
With scientific and technical continuous progress, electronic technology has also obtained development at full speed, a lot of electronic equipments, such as hand Machine, audio amplifier etc., become the daily necessities of people.With the development of Intelligent hardware, meet the diversified need to audio for the user Seeking Truth current sound-box device development trend.
In the prior art, audio amplifier can only play out according to default play mode when playing music, e.g., works as audio amplifier When playing music first, automatically play according to default mode;When user selects other play mode prestoring in audio amplifier, such as select Select the pop pattern prestoring, then audio amplifier is according to pop mode playback music.
It can be seen that, audio amplifier of the prior art can only play music according to the play mode prestoring, so, of the prior art There is the single technical problem of mode of music in audio amplifier.
Content of the invention
The embodiment of the present application provides a kind of method for playing music and music player devices, for solving sound of the prior art There is the single technical problem of mode of music in case, realize for audio file being divided into multiple snatch of musics, and is each sound The corresponding play parameter of happy fragment match playing described audio file, thus increasing the technology effect of music mode Really.
The embodiment of the present application one side provides a kind of method for playing music, is applied in music player devices, including:
First audio file is divided into N number of snatch of music according to preset rules, wherein, described preset rules are specially pre- If duration or default size, N is the integer more than or equal to 2;
Extract the characteristic vector of each snatch of music in described N number of snatch of music, obtain N number of characteristic vector;
Determine and the corresponding play parameter of each characteristic vector in described N number of characteristic vector, obtain N group play parameter;
Described first audio file is play based on described N group play parameter.
Optionally, the characteristic vector of each snatch of music described is the frequency domain character for characterizing each music frequency range described Parameter or audio frequency characteristics parameter.
Optionally, described extract described N number of snatch of music in each snatch of music characteristic vector, obtain N number of feature to Amount, including:
Each snatch of music in described N number of snatch of music is decoded, obtains N group pulse code modulated audio number According to;
Obtain default characteristic vector pickup algorithm;
Based on described characteristic vector pickup algorithm, the every group pulse in described N group pulse code modulated audio data is compiled Code modulating audio frequency data is calculated, and obtains N number of characteristic vector.
Optionally, described determination and the corresponding play parameter of each characteristic vector in described N number of characteristic vector, obtain N group Play parameter, including:
Obtain at least one default characteristic vector, and at least one default characteristic vector described is preset with least one set and broadcast Put the corresponding relation of parameter;
I is taken to be 1 to N successively, by least one default spy vectorial for the ith feature in described N number of characteristic vector and described Levy vector to be mated, determine i-th first eigenvector with described ith feature Vectors matching, when i is for N, obtain N Individual first eigenvector;
Based on described corresponding relation, determine N group play parameter corresponding with described N number of first eigenvector.
Optionally, described least one set presets play parameter is the least one set the being pre-stored in described music player devices One play parameter and/or the least one set second by detecting the calibration operation acquisition of the use user of described music player devices Play parameter and/or least one set the 3rd broadcasting ginseng being sent by the first electronic equipment being connected with described music player devices Number.
Optionally, described based on described N group play parameter play described first audio file, including:
Described N group play parameter is analyzed integrate, forms play parameter row corresponding with described first audio file Table;
Described first audio file is play based on described play parameter list.
Optionally, after described described first audio file of broadcasting based on described play parameter list, methods described is also Including:
Set up and preserve the first corresponding relation of described first audio file and described play parameter list.
Optionally, set up and preserve described first audio file pass corresponding with the first of described play parameter list described After system, methods described also includes:
Obtain the second audio file;
Determine in the vectorial N number of vector differentials with described N number of characteristic vector of N number of second feature of described second audio file Whether each vector differentials is less than or equal to predetermined threshold value;
If so, then obtain described first corresponding relation, and described second audio frequency literary composition is play based on described play parameter list Part.
The embodiment of the present application another aspect additionally provides a kind of music player devices, including:
First segmentation module, for the first audio file is divided into N number of snatch of music according to preset rules, wherein, institute State preset rules and be specially preset duration or default size, N is the integer more than or equal to 2;
First acquisition module, for extracting the characteristic vector of each snatch of music in described N number of snatch of music, obtains N number of Characteristic vector;
Second acquisition module, for determining and the corresponding play parameter of each characteristic vector in described N number of characteristic vector, obtains Take N group play parameter;
First performing module, for playing described first audio file based on described N group play parameter.
Optionally, the characteristic vector of each snatch of music described is the frequency domain character for characterizing each music frequency range described Parameter or audio frequency characteristics parameter.
Optionally, described first acquisition module specifically for:
Each snatch of music in described N number of snatch of music is decoded, obtains N group pulse code modulated audio number According to;
Obtain default characteristic vector pickup algorithm;
Based on described characteristic vector pickup algorithm, the every group pulse in described N group pulse code modulated audio data is compiled Code modulating audio frequency data is calculated, and obtains N number of characteristic vector.
Optionally, described second acquisition module specifically for:
Obtain at least one default characteristic vector, and at least one default characteristic vector described is preset with least one set and broadcast Put the corresponding relation of parameter;
I is taken to be 1 to N successively, by least one default spy vectorial for the ith feature in described N number of characteristic vector and described Levy vector to be mated, determine i-th first eigenvector with described ith feature Vectors matching, when i is for N, obtain N Individual first eigenvector;
Based on described corresponding relation, determine N group play parameter corresponding with described N number of first eigenvector.
Optionally, described least one set presets play parameter is the least one set the being pre-stored in described music player devices One play parameter and/or the least one set second by detecting the calibration operation acquisition of the use user of described music player devices Play parameter and/or least one set the 3rd broadcasting ginseng being sent by the first electronic equipment being connected with described music player devices Number.
Optionally, described first performing module specifically for:
Described N group play parameter is analyzed integrate, forms play parameter row corresponding with described first audio file Table;
Described first audio file is play based on described play parameter list.
Optionally, described music player devices also include:
Second performing module, for setting up and preserving the first couple of described first audio file and described play parameter list Should be related to.
Optionally, described music player devices also include:
3rd acquisition module, for obtaining the second audio file;
First determining module, the N number of second feature for determining described second audio file vectorial with described N number of feature to In N number of vector differentials of amount, whether each vector differentials is less than or equal to predetermined threshold value;
3rd performing module, for if so, then obtaining described first corresponding relation, and is broadcast based on described play parameter list Put described second audio file.
Said one in the embodiment of the present application or multiple technical scheme, at least have following one or more technology effect Really:
First, due to the technical scheme in the embodiment of the present application, it is divided into N using by the first audio file according to preset rules Individual snatch of music, wherein, described preset rules are specially preset duration or default size, and N is the integer more than or equal to 2;Carry Take the characteristic vector of each snatch of music in described N number of snatch of music, obtain N number of characteristic vector;Determine with described N number of feature to The corresponding play parameter of each characteristic vector in amount, obtains N group play parameter;Play described the based on described N group play parameter The technological means of one audio file, so, music file to be played is carried out preconditioned fragment, is divided into several snatch of musics, Then the characteristic vector according to each snatch of music, mates corresponding play parameter for each snatch of music, thus should playing During music file, according to the multiple play parameter played in order determined, efficiently solve for solving sound of the prior art There is the single technical problem of mode of music in case, realize playing music literary compositions using multiple different play parameter Part, increases the technique effect of music mode.
2nd, due to the technical scheme in the embodiment of the present application, presetting play parameter using described least one set is to be pre-stored in Least one set first play parameter in described music player devices and/or the use use by detecting described music player devices Least one set second play parameter that the calibration operation at family obtains and/or by the first electronics being connected with described music player devices The technological means of least one set the 3rd play parameter that equipment sends, so, when for each snatch of music coupling play parameter, Can be mated from the play parameter of systemic presupposition it is also possible to oneself distinctive calibration parameter is saved in by music by user In playback equipment, then mated from the play parameter that oneself preserves, it is also possible to from by other electronics such as server Mated in the play parameter that equipment pushes, thus providing multiple choices for snatch of music, so that each snatch of music Most suitable play parameter can be matched it is achieved that the diversified technique effect of play parameter.
3rd, due to the technical scheme in the embodiment of the present application, using obtaining the second audio file;Determine described second audio frequency N number of second feature of file is vectorial and N number of vector differentials of described N number of characteristic vector in each vector differentials whether be less than or equal to Predetermined threshold value;If so, then obtain described first corresponding relation, and described second audio frequency literary composition is play based on described play parameter list The technological means of part, so, after generating play parameter list corresponding with the first audio file, if play the first sound again When other audio files of frequency file or broadcasting are similar to the first audio file, then can directly adopt the first audio file Play parameter list is play, without being analyzed to audio file again it is achieved that reducing the amount of calculation of music player devices Technique effect.
Brief description
In order to be illustrated more clearly that the embodiment of the present application or technical scheme of the prior art, embodiment will be described below In required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only the present invention some Embodiment.
A kind of flow chart of method for playing music that Fig. 1 provides for the embodiment of the present application one;
A kind of structured flowchart of music player devices that Fig. 2 provides for the embodiment of the present application two.
Specific embodiment
The embodiment of the present application provides a kind of method for playing music and music player devices, for solving sound of the prior art There is the single technical problem of mode of music in case, realize for audio file being divided into multiple snatch of musics, and is each sound The corresponding play parameter of happy fragment match playing described audio file, thus increasing the technology effect of music mode Really.
Technical scheme in the embodiment of the present application is to solve above-mentioned technical problem, and general thought is as follows:
A kind of method for playing music, is applied in music player devices, including:
First audio file is divided into N number of snatch of music according to preset rules, wherein, described preset rules are specially pre- If duration or default size, N is the integer more than or equal to 2;
Extract the characteristic vector of each snatch of music in described N number of snatch of music, obtain N number of characteristic vector;
Determine and the corresponding play parameter of each characteristic vector in described N number of characteristic vector, obtain N group play parameter;
Described first audio file is play based on described N group play parameter.
In technique scheme, it is divided into N number of snatch of music using by the first audio file according to preset rules, its In, described preset rules are specially preset duration or default size, and N is the integer more than or equal to 2;Extract described N number of music The characteristic vector of each snatch of music in fragment, obtains N number of characteristic vector;Determine and each feature in described N number of characteristic vector The corresponding play parameter of vector, obtains N group play parameter;Described first audio file is play based on described N group play parameter Technological means, so, music file to be played is carried out preconditioned fragment, is divided into several snatch of musics, then according to each The characteristic vector of snatch of music, mates corresponding play parameter for each snatch of music, thus when playing this music file, pressing According to the multiple play parameter played in order determined, efficiently solve and there is music for solving audio amplifier of the prior art The single technical problem of mode, realize playing music files using multiple different play parameter, increase music The technique effect of mode.
In order to be better understood from technique scheme, below by accompanying drawing and specific embodiment to technical solution of the present invention It is described in detail it should be understood that the specific features in the embodiment of the present application and embodiment are detailed to technical solution of the present invention Thin explanation, rather than the restriction to technical solution of the present invention, in the case of not conflicting, the embodiment of the present application and embodiment In technical characteristic can be combined with each other.
Embodiment one
Refer to Fig. 1, a kind of flow chart of the method for playing music providing for the embodiment of the present application one, methods described is applied In music player devices, including:
S101:First audio file is divided into N number of snatch of music according to preset rules, wherein, described preset rules tool Body is preset duration or default size, and N is the integer more than or equal to 2;
S102:Extract the characteristic vector of each snatch of music in described N number of snatch of music, obtain N number of characteristic vector;
S103:Determine and the corresponding play parameter of each characteristic vector in described N number of characteristic vector, obtain N group and play ginseng Number;
S104:Described first audio file is play based on described N group play parameter.
In specific implementation process, described music player devices can be specifically audio amplifier, smart mobile phone or other There is the electronic equipment playing audio file, here, just differ one schematically illustrating.Described first audio file can be preserved Recommended in the memory cell middle pitch frequency file of described music player devices or by server or other electronic equipments Audio file, is not restricted in the embodiment of the present application.
When music is play using the method in the embodiment of the present application, step S101 is first carried out, that is,:By the first audio frequency literary composition Part is divided into N number of snatch of music according to preset rules, and wherein, described preset rules are specially preset duration or default size, N It is the integer more than or equal to 2.
In specific implementation process, with described music player devices as audio amplifier, described first audio file be saved in sound As a example song 1 in the memory cell of happy playback equipment, when the processor of audio amplifier determines and is currently needed for playing song 1, then obtain Take the fileinfo of song 1, such as the size of song 1 or the total duration of song 1, then according to the segmentation rule having predefined Then, as carried out segmentation according to default duration or carrying out segmentation according to default size, song 1 is divided into multiple musical films Section.
Taking according to default duration, segmentation is carried out to song 1 as a example, a length of 30s when setting default, the total duration of song 1 For 3min, then every 30s content of song 1 is divided into a snatch of music, then obtains 6 snatch of musics.Certainly, if song 1 Total duration is not 3 multiple, and such as total duration is 190s, then need song 1 to be divided into 7 snatch of musics, less than the part of 30s It is considered a snatch of music.
After execution completes step S101, method just execution step S102 in the embodiment of the present application, that is,:Extract described The characteristic vector of each snatch of music in N number of snatch of music, obtains N number of characteristic vector.
In the embodiment of the present application, the characteristic vector of each snatch of music described is for characterizing each music frequency range described Frequency domain character parameter or audio frequency characteristics parameter.
In specific implementation process, continue to use above-mentioned example, when audio amplifier processor by song 1 be divided into 6 snatch of musics it Afterwards, then extract the characteristic parameter of each snatch of music, can be specifically to extract frequency domain character parameter, such as each snatch of music is each The frequency gain of individual frequency, spectrogram etc.;Can also be to extract range characteristic parameter, such as sub-belt energy ratio, frequency barycenter or Baseband frequency etc., certainly, those skilled in the art can also extract other characteristic parameters of snatch of music, in the embodiment of the present application In be not restricted.In the embodiment of the present application, said as a example described characteristic vector using spectral centroid and frequency spectrum transition Bright.
In the embodiment of the present application, the specific implementation of step S102 is as follows:
Each snatch of music in described N number of snatch of music is decoded, obtains N group pulse code modulated audio number According to;
Obtain default characteristic vector pickup algorithm;
Based on described characteristic vector pickup algorithm, the every group pulse in described N group pulse code modulated audio data is compiled Code modulating audio frequency data is calculated, and obtains N number of characteristic vector.
In specific implementation process, continue to use above-mentioned example, when audio amplifier processor by song 1 be divided into 6 snatch of musics it Afterwards, first 6 snatch of music perform decodings based on compressed encoding are obtained with 6 corresponding PCM audio data, then extracts solution The characteristic vector of the PCM audio data after code.Specifically, taking extract the characteristic vector of first snatch of music as a example, by One snatch of music is divided into the clip (fragment) of 2s, non-overlapping part between adjacent clip, adds the Hamming of 50ms for each clip Window shape framing, adjacent interframe has the lap of 25ms.Then using the multiple frames obtaining, calculate the frequency spectrum of first music fragment Barycenter and frequency spectrum transition.Wherein, spectral centroid is the index of tolerance audio frequency brightness, and computational methods are as follows:
C = Σ 1 N f M [ f ] Σ 1 N M [ f ]
Wherein, C is spectral centroid, and M [f] represents the size of the energy value when Fourier transformation medium frequency is f, and N is sampling The number that frequency calculates.
Frequency spectrum transition reflect spectral change, and it is defined as follows:
F=| | M [f]-MP[f]||
Mp[f] represents the size of the corresponding energy value of previous frame rate f.
And then obtain the characteristic vector (C of first snatch of music1, F1).The like, obtain remaining 5 musical films respectively The characteristic vector of section.
Certainly, those skilled in the art can also obtain the characteristic vector of snatch of music using other modes, in the application It is not restricted in embodiment.
After execution completes step S102, method just execution step S103 in the embodiment of the present application, that is,:Determine and institute State the corresponding play parameter of each characteristic vector in N number of characteristic vector, obtain N group play parameter.
In the embodiment of the present application, the specific implementation of step S103 is as follows:
Obtain at least one default characteristic vector, and at least one default characteristic vector described is preset with least one set and broadcast Put the corresponding relation of parameter;
I is taken to be 1 to N successively, by least one default spy vectorial for the ith feature in described N number of characteristic vector and described Levy vector to be mated, determine i-th first eigenvector with described ith feature Vectors matching, when i is for N, obtain N Individual first eigenvector;
Based on described corresponding relation, determine N group play parameter corresponding with described N number of first eigenvector.
Wherein, described least one set presets play parameter is the least one set first being pre-stored in described music player devices The least one set second of play parameter and/or the calibration operation acquisition using user passing through the described music player devices of detection is broadcast Put parameter and/or least one set the 3rd play parameter being sent by the first electronic equipment being connected with described music player devices.
In specific implementation process, continue to use above-mentioned example, when the processor of audio amplifier obtains corresponding 6 of 6 snatch of musics After characteristic vector, processor needs respectively 6 characteristic vectors to mate corresponding play parameter.Memory cell in audio amplifier In, it is previously stored with multigroup play parameter.Described play parameter can be that in audio amplifier, default play mode is corresponding plays ginseng In number, such as audio amplifier, default play parameter has:Pop music parameter set, classical music music parameter collection, rock music parameter set, with When, the pop music characteristic vector corresponding with pop music parameter set that be also stored with the memory cell of audio amplifier and classic musical sound The corresponding classical music characteristic vector of happy parameter set, and rock music characteristic vector corresponding with rock music parameter set.It is each The extracting mode of the corresponding characteristic vector of individual preset musical parameter set can be using as the method in step S102, it would however also be possible to employ Other modes, are not restricted in the embodiment of the present application.Then, processor is by 6 characteristic vectors obtaining and memory cell The characteristic vector prestoring is compared, and e.g., compares (C1, F1) respectively with pop music characteristic vector, classical music characteristic vector and The similarity of rock music characteristic vector, determines (C1, F1) with the similarity highest of pop music characteristic vector, so that it is determined that going out The first eigenvector of first snatch of music is pop music characteristic vector.Due to pop music characteristic vector and pop music Play parameter is corresponding it is determined that the play parameter going out first snatch of music is pop music play parameter.
According to the method described above, other corresponding play parameter of 5 characteristic vectors are determined, thus obtaining 6 groups of play parameter. Certainly, described 6 groups of play parameter can different or a portion identical, another part is different, such as the Two snatch of musics correspond to classical music play parameter, and the 3rd snatch of music corresponds to rock music play parameter, the 4th musical film The corresponding rock music play parameter of section, the 5th snatch of music corresponds to pop play parameter, and the 6th snatch of music is corresponding classic Happy play parameter.
In specific implementation process, except can be mated it is also possible to by user with play parameter default in audio amplifier Oneself distinctive calibration parameter is saved in music player devices, is then mated from the play parameter that oneself preserves, It is also possible to be mated it is also possible to obtain this simultaneously from the play parameter being pushed by other electronic equipments such as server All play parameter of three aspects, are mated from all play parameter, are not restricted in the embodiment of the present application.
After execution completes step S103, method just execution step S104 in the embodiment of the present application, that is,:Based on described N group play parameter plays described first audio file.
In the embodiment of the present application, the specific implementation of step S104 is as follows:
Described N group play parameter is analyzed integrate, forms play parameter row corresponding with described first audio file Table;
Described first audio file is play based on described play parameter list.
In specific implementation process, continue to use above-mentioned example, when broadcasting of first snatch of music determined by the processor of audio amplifier Putting parameter is pop play parameter, and second snatch of music corresponds to classical music play parameter, and the 3rd snatch of music correspondence is shaken Roll happy play parameter, the 4th snatch of music corresponds to rock music play parameter, the 5th snatch of music corresponds to pop and play ginseng Number, after the 6th snatch of music corresponds to classical music play parameter, just forms play parameter list.Playing sequence as music is Fragment 1-6, then play parameter list then be pop music play parameter → classical music play parameter → rock music play parameter → Rock music play parameter → pop play parameter → classical music play parameter.Then song 1 is play in above-mentioned list.
After execution completes above-mentioned steps, methods described also includes:
Set up and preserve the first corresponding relation of described first audio file and described play parameter list;
Obtain the second audio file;
Determine in the vectorial N number of vector differentials with described N number of characteristic vector of N number of second feature of described second audio file Whether each vector differentials is less than or equal to predetermined threshold value;
If so, then obtain described first corresponding relation, and described second audio frequency literary composition is play based on described play parameter list Part.
In specific implementation process, continue to use above-mentioned example, when the processor of audio amplifier forms the play parameter list to song 1 Afterwards, then song 1 is saved with play parameter list.When the processor of audio amplifier wants here to play song, then extract first Need the characteristic vector of the song of broadcasting, then the characteristic vector of the characteristic vector extracting and song 1 is compared, passes through The difference of characteristic vector determines whether the song being currently needed for playing is similar or identical with song 1, if same or similar, From memory cell, directly obtain play parameter list corresponding with song 1, the play parameter list according to song 1 is play current Need the song play, thus reducing the amount of calculation of sound box processor.
Embodiment two
It is based on and the embodiment of the present application one identical inventive concept, refer to Fig. 2, providing for the embodiment of the present application two Plant the structured flowchart of music player devices, including:
First segmentation module 101, for the first audio file is divided into N number of snatch of music according to preset rules, wherein, Described preset rules are specially preset duration or default size, and N is the integer more than or equal to 2;
First acquisition module 102, for extracting the characteristic vector of each snatch of music in described N number of snatch of music, obtains N Individual characteristic vector;
Second acquisition module 103, for determining broadcasting ginseng corresponding with each characteristic vector in described N number of characteristic vector Number, obtains N group play parameter;
First performing module 104, for playing described first audio file based on described N group play parameter.
In the embodiment of the present application two, the characteristic vector of each snatch of music described is for characterizing each music frequency described The frequency domain character parameter of section or audio frequency characteristics parameter.
In the embodiment of the present application two, the first acquisition module 102 specifically for:
Each snatch of music in described N number of snatch of music is decoded, obtains N group pulse code modulated audio number According to;
Obtain default characteristic vector pickup algorithm;
Based on described characteristic vector pickup algorithm, the every group pulse in described N group pulse code modulated audio data is compiled Code modulating audio frequency data is calculated, and obtains N number of characteristic vector.
In the embodiment of the present application two, the second acquisition module 103 specifically for:
Obtain at least one default characteristic vector, and at least one default characteristic vector described is preset with least one set and broadcast Put the corresponding relation of parameter;
I is taken to be 1 to N successively, by least one default spy vectorial for the ith feature in described N number of characteristic vector and described Levy vector to be mated, determine i-th first eigenvector with described ith feature Vectors matching, when i is for N, obtain N Individual first eigenvector;
Based on described corresponding relation, determine N group play parameter corresponding with described N number of first eigenvector.
In the embodiment of the present application two, it is to be pre-stored in described music player devices that described least one set presets play parameter Least one set first play parameter and/or by detect described music player devices use user calibration operation obtain Least one set second play parameter and/or the least one set being sent by the first electronic equipment being connected with described music player devices 3rd play parameter.
In the embodiment of the present application two, the first performing module 104 specifically for:
Described N group play parameter is analyzed integrate, forms play parameter row corresponding with described first audio file Table;
Described first audio file is play based on described play parameter list.
In the embodiment of the present application two, described music player devices also include:
Second performing module 105, for setting up and preserving the of described first audio file and described play parameter list One corresponding relation.
In the embodiment of the present application two, described music player devices also include:
3rd acquisition module 106, for obtaining the second audio file;
First determining module 107, the N number of second feature for determining described second audio file vectorial with described N number of spy Levy whether each vector differentials in N number of vector differentials of vector are less than or equal to predetermined threshold value;
If so, 3rd performing module 108, for then obtaining described first corresponding relation, and based on described play parameter row Described second audio file play by table.
By one or more of the embodiment of the present application technical scheme, it is possible to achieve one or more technology effects as follows Really:
First, due to the technical scheme in the embodiment of the present application, it is divided into N using by the first audio file according to preset rules Individual snatch of music, wherein, described preset rules are specially preset duration or default size, and N is the integer more than or equal to 2;Carry Take the characteristic vector of each snatch of music in described N number of snatch of music, obtain N number of characteristic vector;Determine with described N number of feature to The corresponding play parameter of each characteristic vector in amount, obtains N group play parameter;Play described the based on described N group play parameter The technological means of one audio file, so, music file to be played is carried out preconditioned fragment, is divided into several snatch of musics, Then the characteristic vector according to each snatch of music, mates corresponding play parameter for each snatch of music, thus should playing During music file, according to the multiple play parameter played in order determined, efficiently solve for solving sound of the prior art There is the single technical problem of mode of music in case, realize playing music literary compositions using multiple different play parameter Part, increases the technique effect of music mode.
2nd, due to the technical scheme in the embodiment of the present application, presetting play parameter using described least one set is to be pre-stored in Least one set first play parameter in described music player devices and/or the use use by detecting described music player devices Least one set second play parameter that the calibration operation at family obtains and/or by the first electronics being connected with described music player devices The technological means of least one set the 3rd play parameter that equipment sends, so, when for each snatch of music coupling play parameter, Can be mated from the play parameter of systemic presupposition it is also possible to oneself distinctive calibration parameter is saved in by music by user In playback equipment, then mated from the play parameter that oneself preserves, it is also possible to from by other electronics such as server Mated in the play parameter that equipment pushes, thus providing multiple choices for snatch of music, so that each snatch of music Most suitable play parameter can be matched it is achieved that the diversified technique effect of play parameter.
3rd, due to the technical scheme in the embodiment of the present application, using obtaining the second audio file;Determine described second audio frequency N number of second feature of file is vectorial and N number of vector differentials of described N number of characteristic vector in each vector differentials whether be less than or equal to Predetermined threshold value;If so, then obtain described first corresponding relation, and described second audio frequency literary composition is play based on described play parameter list The technological means of part, so, after generating play parameter list corresponding with the first audio file, if play the first sound again When other audio files of frequency file or broadcasting are similar to the first audio file, then can directly adopt the first audio file Play parameter list is play, without being analyzed to audio file again it is achieved that reducing the amount of calculation of music player devices Technique effect.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can be using complete hardware embodiment, complete software embodiment or the reality combining software and hardware aspect Apply the form of example.And, the present invention can be using in one or more computers wherein including computer usable program code The upper computer program implemented of usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) produces The form of product.
The present invention is the flow process with reference to method according to embodiments of the present invention, equipment (system) and computer program Figure and/or block diagram are describing.It should be understood that can be by each stream in computer program instructions flowchart and/or block diagram Flow process in journey and/or square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processor instructing all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device is to produce A raw machine is so that produced for reality by the instruction of computer or the computing device of other programmable data processing device The device of the function of specifying in present one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide computer or other programmable data processing device with spy Determine in the computer-readable memory that mode works so that the instruction generation inclusion being stored in this computer-readable memory refers to Make the manufacture of device, this command device realize in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or The function of specifying in multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing device so that counting On calculation machine or other programmable devices, execution series of operation steps to be to produce computer implemented process, thus in computer or On other programmable devices, the instruction of execution is provided for realizing in one flow process of flow chart or multiple flow process and/or block diagram one The step of the function of specifying in individual square frame or multiple square frame.
Specifically, the corresponding computer program instructions of the method for playing music in the embodiment of the present application can be stored in CD, hard disk, on the storage medium such as USB flash disk, when computer program instructions quilt corresponding with method for playing music in storage medium When one electronic equipment reads or is performed, comprise the steps:
First audio file is divided into N number of snatch of music according to preset rules, wherein, described preset rules are specially pre- If duration or default size, N is the integer more than or equal to 2;
Extract the characteristic vector of each snatch of music in described N number of snatch of music, obtain N number of characteristic vector;
Determine and the corresponding play parameter of each characteristic vector in described N number of characteristic vector, obtain N group play parameter;
Described first audio file is play based on described N group play parameter.
Optionally, in described storage medium storage and step:Extract each snatch of music in described N number of snatch of music Characteristic vector, obtain N number of characteristic vector, corresponding computer program instructions when executed, including:
Each snatch of music in described N number of snatch of music is decoded, obtains N group pulse code modulated audio number According to;
Obtain default characteristic vector pickup algorithm;
Based on described characteristic vector pickup algorithm, the every group pulse in described N group pulse code modulated audio data is compiled Code modulating audio frequency data is calculated, and obtains N number of characteristic vector.
Optionally, in described storage medium storage and step:Determine and each characteristic vector in described N number of characteristic vector Corresponding play parameter, obtain N group play parameter, corresponding computer program instructions when executed, including:
Obtain at least one default characteristic vector, and at least one default characteristic vector described is preset with least one set and broadcast Put the corresponding relation of parameter;
I is taken to be 1 to N successively, by least one default spy vectorial for the ith feature in described N number of characteristic vector and described Levy vector to be mated, determine i-th first eigenvector with described ith feature Vectors matching, when i is for N, obtain N Individual first eigenvector;
Based on described corresponding relation, determine N group play parameter corresponding with described N number of first eigenvector.
Optionally, in described storage medium storage and step:Described first audio frequency is play based on described N group play parameter File, corresponding computer program instructions when executed, including:
Described N group play parameter is analyzed integrate, forms play parameter row corresponding with described first audio file Table;
Described first audio file is play based on described play parameter list.
Optionally, be also stored with described storage medium other computer program instructions, and described other calculates Machine programmed instruction with step:Play the corresponding computer program of described first audio file based on described play parameter list to refer to It is performed after order execution, including:
Set up and preserve the first corresponding relation of described first audio file and described play parameter list.
Optionally, be also stored with described storage medium other computer program instructions, and described other calculates Machine programmed instruction with step:Set up and preserve the first corresponding relation of described first audio file and described play parameter list It is performed after corresponding computer program instructions execution, including:
Obtain the second audio file;
Determine in the vectorial N number of vector differentials with described N number of characteristic vector of N number of second feature of described second audio file Whether each vector differentials is less than or equal to predetermined threshold value;
If so, then obtain described first corresponding relation, and described second audio frequency literary composition is play based on described play parameter list Part.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation Property concept, then can make other change and modification to these embodiments.So, claims are intended to be construed to including excellent Select embodiment and fall into being had altered and changing of the scope of the invention.
Obviously, those skilled in the art can carry out the various changes and modification essence without deviating from the present invention to the present invention God and scope.So, if these modifications of the present invention and modification belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprise these changes and modification.

Claims (16)

1. a kind of method for playing music, is applied in music player devices, including:
First audio file is divided into N number of snatch of music according to preset rules, wherein, when described preset rules are specially default Long or default size, N is the integer more than or equal to 2;
Extract the characteristic vector of each snatch of music in described N number of snatch of music, obtain N number of characteristic vector;
Determine and the corresponding play parameter of each characteristic vector in described N number of characteristic vector, obtain N group play parameter;
Described first audio file is play based on described N group play parameter.
2. the method for claim 1 is it is characterised in that the characteristic vector of each snatch of music described is for characterizing State frequency domain character parameter or the audio frequency characteristics parameter of each music frequency range.
3. method as claimed in claim 1 or 2 is it is characterised in that each musical film in the described N number of snatch of music of described extraction The characteristic vector of section, obtains N number of characteristic vector, including:
Each snatch of music in described N number of snatch of music is decoded, obtains N group pulse code modulated audio data;
Obtain default characteristic vector pickup algorithm;
Based on described characteristic vector pickup algorithm, the every group pulse coding in described N group pulse code modulated audio data is adjusted Voice data processed is calculated, and obtains N number of characteristic vector.
4. method as claimed in claim 3 it is characterised in that in described determination and described N number of characteristic vector each feature to Measure corresponding play parameter, obtain N group play parameter, including:
Obtain at least one default characteristic vector, and at least one default characteristic vector described is preset with least one set and play ginseng The corresponding relation of number;
Take i to be 1 to N successively, by vectorial for the ith feature in described N number of characteristic vector with least one default feature described to Amount is mated, and determines and i-th first eigenvector of described ith feature Vectors matching, when i is for N, obtains N number of the One characteristic vector;
Based on described corresponding relation, determine N group play parameter corresponding with described N number of first eigenvector.
5. method as claimed in claim 4 is it is characterised in that it is to be pre-stored in described sound that described least one set presets play parameter Least one set first play parameter in happy playback equipment and/or the school by detecting the use user of described music player devices Standard is operated least one set second play parameter obtaining and/or is sent out by the first electronic equipment being connected with described music player devices Least one set the 3rd play parameter sent.
6. method as claimed in claim 5 is it is characterised in that described play described first sound based on described N group play parameter Frequency file, including:
Described N group play parameter is analyzed integrate, forms play parameter list corresponding with described first audio file;
Described first audio file is play based on described play parameter list.
7. method as claimed in claim 6 is it is characterised in that play described first described based on described play parameter list After audio file, methods described also includes:
Set up and preserve the first corresponding relation of described first audio file and described play parameter list.
8. method as claimed in claim 7 it is characterised in that described set up and preserve described first audio file with described After first corresponding relation of play parameter list, methods described also includes:
Obtain the second audio file;
Determine each in the vectorial N number of vector differentials with described N number of characteristic vector of N number of second feature of described second audio file Whether vector differentials are less than or equal to predetermined threshold value;
If so, then obtain described first corresponding relation, and described second audio file is play based on described play parameter list.
9. a kind of music player devices, including:
First segmentation module, for the first audio file is divided into N number of snatch of music according to preset rules, wherein, described pre- If rule is specially preset duration or default size, N is the integer more than or equal to 2;
First acquisition module, for extracting the characteristic vector of each snatch of music in described N number of snatch of music, obtains N number of feature Vector;
Second acquisition module, for determining and the corresponding play parameter of each characteristic vector in described N number of characteristic vector, obtains N Group play parameter;
First performing module, for playing described first audio file based on described N group play parameter.
10. music player devices as claimed in claim 9 are it is characterised in that the characteristic vector of each snatch of music described is For characterizing frequency domain character parameter or the audio frequency characteristics parameter of each music frequency range described.
11. music player devices as described in claim 9 or 10 it is characterised in that described first acquisition module specifically for:
Each snatch of music in described N number of snatch of music is decoded, obtains N group pulse code modulated audio data;
Obtain default characteristic vector pickup algorithm;
Based on described characteristic vector pickup algorithm, the every group pulse coding in described N group pulse code modulated audio data is adjusted Voice data processed is calculated, and obtains N number of characteristic vector.
12. music player devices as claimed in claim 11 it is characterised in that described second acquisition module specifically for:
Obtain at least one default characteristic vector, and at least one default characteristic vector described is preset with least one set and play ginseng The corresponding relation of number;
Take i to be 1 to N successively, by vectorial for the ith feature in described N number of characteristic vector with least one default feature described to Amount is mated, and determines and i-th first eigenvector of described ith feature Vectors matching, when i is for N, obtains N number of the One characteristic vector;
Based on described corresponding relation, determine N group play parameter corresponding with described N number of first eigenvector.
13. music player devices as claimed in claim 12 are it is characterised in that it is pre- that described least one set presets play parameter There is least one set first play parameter in described music player devices and/or by detecting making of described music player devices With least one set second play parameter of the calibration operation acquisition of user and/or by first being connected with described music player devices Least one set the 3rd play parameter that electronic equipment sends.
14. music player devices as claimed in claim 13 it is characterised in that described first performing module specifically for:
Described N group play parameter is analyzed integrate, forms play parameter list corresponding with described first audio file;
Described first audio file is play based on described play parameter list.
15. music player devices as claimed in claim 14 are it is characterised in that described music player devices also include:
Second performing module, for setting up and preserving described first audio file pass corresponding with the first of described play parameter list System.
16. music player devices as claimed in claim 15 are it is characterised in that described music player devices also include:
3rd acquisition module, for obtaining the second audio file;
First determining module, the N number of second feature for determining described second audio file is vectorial and described N number of characteristic vector In N number of vector differentials, whether each vector differentials is less than or equal to predetermined threshold value;
3rd performing module, for if so, then obtaining described first corresponding relation, and plays institute based on described play parameter list State the second audio file.
CN201610872623.7A 2016-09-30 2016-09-30 Music play method and music play device Pending CN106384603A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610872623.7A CN106384603A (en) 2016-09-30 2016-09-30 Music play method and music play device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610872623.7A CN106384603A (en) 2016-09-30 2016-09-30 Music play method and music play device

Publications (1)

Publication Number Publication Date
CN106384603A true CN106384603A (en) 2017-02-08

Family

ID=57937040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610872623.7A Pending CN106384603A (en) 2016-09-30 2016-09-30 Music play method and music play device

Country Status (1)

Country Link
CN (1) CN106384603A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107249080A (en) * 2017-06-26 2017-10-13 维沃移动通信有限公司 A kind of method, device and mobile terminal for adjusting audio
CN112201283A (en) * 2020-09-09 2021-01-08 北京小米松果电子有限公司 Audio playing method and device
CN117093741A (en) * 2023-07-19 2023-11-21 杭州网易云音乐科技有限公司 Sound effect determination method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070078895A1 (en) * 2005-06-17 2007-04-05 Kuan-Hong Hsieh System and method for generating a play-list
EP2061035A2 (en) * 2001-05-22 2009-05-20 Pioneer Corporation Information playback apparatus
CN102970555A (en) * 2012-11-30 2013-03-13 深圳Tcl新技术有限公司 Method and device for regulating 3D (Three-Dimensional) video play mode
CN103400593A (en) * 2013-07-03 2013-11-20 网易(杭州)网络有限公司 Audio-auditioning method and device
CN104658559A (en) * 2013-11-19 2015-05-27 深圳市快播科技有限公司 Multimedia playing method and multimedia playing device
CN104735528A (en) * 2015-03-02 2015-06-24 青岛海信电器股份有限公司 Sound effect matching method and device
CN105375896A (en) * 2014-08-29 2016-03-02 中兴通讯股份有限公司 Method for automatically adjusting volume and electronic equipment
CN105404642A (en) * 2015-10-23 2016-03-16 广东欧珀移动通信有限公司 Audio playing method and user terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2061035A2 (en) * 2001-05-22 2009-05-20 Pioneer Corporation Information playback apparatus
US20070078895A1 (en) * 2005-06-17 2007-04-05 Kuan-Hong Hsieh System and method for generating a play-list
CN102970555A (en) * 2012-11-30 2013-03-13 深圳Tcl新技术有限公司 Method and device for regulating 3D (Three-Dimensional) video play mode
CN103400593A (en) * 2013-07-03 2013-11-20 网易(杭州)网络有限公司 Audio-auditioning method and device
CN104658559A (en) * 2013-11-19 2015-05-27 深圳市快播科技有限公司 Multimedia playing method and multimedia playing device
CN105375896A (en) * 2014-08-29 2016-03-02 中兴通讯股份有限公司 Method for automatically adjusting volume and electronic equipment
CN104735528A (en) * 2015-03-02 2015-06-24 青岛海信电器股份有限公司 Sound effect matching method and device
CN105404642A (en) * 2015-10-23 2016-03-16 广东欧珀移动通信有限公司 Audio playing method and user terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107249080A (en) * 2017-06-26 2017-10-13 维沃移动通信有限公司 A kind of method, device and mobile terminal for adjusting audio
CN112201283A (en) * 2020-09-09 2021-01-08 北京小米松果电子有限公司 Audio playing method and device
CN117093741A (en) * 2023-07-19 2023-11-21 杭州网易云音乐科技有限公司 Sound effect determination method, device, equipment and storage medium
CN117093741B (en) * 2023-07-19 2026-01-02 杭州网易云音乐科技有限公司 Sound effect determination methods, devices, equipment and storage media

Similar Documents

Publication Publication Date Title
US20230245645A1 (en) Methods and Apparatus to Segment Audio and Determine Audio Segment Similarities
US9412391B2 (en) Signal processing device, signal processing method, and computer program product
CA2650612C (en) An adaptive user interface
US9099064B2 (en) Method for extracting representative segments from music
CN104464726B (en) A kind of determination method and device of similar audio
EP2854128A1 (en) Audio analysis apparatus
CN105741835B (en) A kind of audio-frequency information processing method and terminal
US7041892B2 (en) Automatic generation of musical scratching effects
CN111640411B (en) Audio synthesis method, device and computer readable storage medium
WO2023040520A1 (en) Method and apparatus for performing music matching of video, and computer device and storage medium
Hove et al. Increased levels of bass in popular music recordings 1955–2016 and their relation to loudness
CN105187936B (en) Based on the method for broadcasting multimedia file and device for singing audio scoring
KR20080066007A (en) Audio processing method and apparatus for playback
CN106384603A (en) Music play method and music play device
CN113674723B (en) Audio processing method, computer equipment and readable storage medium
CN109410972B (en) Method, device and storage medium for generating sound effect parameters
CN106548792A (en) Intelligent sound box device, mobile terminal and music processing method
Pilia et al. Time scaling detection and estimation in audio recordings
CN105632523A (en) Method and device for regulating sound volume output value of audio data, and terminal
CN106095943A (en) Give song recitals and know well range detection method and device
CN101370216B (en) Emotional processing and playing method for mobile phone audio files
CN111477248B (en) Audio noise detection method and device
CN106649643B (en) A kind of audio data processing method and its device
CN1763841B (en) Tone data generation method and tone synthesis method, and apparatus therefor
CN108538309B (en) Singing voice detection method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170208