Summary of the invention
The technical problem to be solved in the present invention is, for the above-mentioned defect of prior art, provides a kind of musical sound control method based on audio-frequence player device and system.Provide a kind of the musical sound control method based on audio-frequence player device and system of fast and reliable, by musical sound control method of the present invention, effectively can solve above-mentioned defect of the prior art, there will not be the situation that sound in the process of listening to the music is suddenly big or suddenly small, decrease the frequency that user operation volume adjusting touches the button, provide users with the convenient.
The technical scheme that technical solution problem of the present invention adopts is as follows:
Based on a musical sound control method for audio-frequence player device, wherein, comprise step:
A, arrange according to various volume lower output audio power corresponding relation, the volume control documents arranging the volume that lower described audio file actual needs is arranged for the various volume in recording user interface is set for each audio file;
B, when start displaying audio file time, first search and whether have the volume control documents corresponding with current broadcasting music;
C, when there being the volume control documents corresponding with current broadcasting music, then obtain the volume value V1 that active user is arranged, in the volume control documents corresponding with current broadcasting music, search corresponding actual of the volume value V1 that arranges with user arrange volume value V2, controlling the volume value that audio-frequence player device arranges current broadcasting music is V2.
The described musical sound control method based on audio-frequence player device, wherein, described steps A specifically comprises:
A1, audio coding according to each audio file self, detect the audio power corresponding relation that the various volume of each audio file arranges lower output;
A2, arrange according to various volume lower output audio power corresponding relation, the volume control documents arranging the volume that lower described audio file actual needs is arranged for the various volume in recording user interface is set for each audio file, for actual corresponding to the various volume values set by the recording user of the inside, volume is set.
The described musical sound control method based on audio-frequence player device, wherein, described steps A also comprises:
S10, first time be the first audio file volume control documents is set time, first play this first audio file and obtain the volume V1 that active user is arranged and the power W1 obtaining the output of audio-frequence player device sound output every a schedule time T, the power W1 that the sound output of the volume V1 that the active user obtained the same time is arranged and correspondence exports is designated as volume V1 and power W1 corresponding relation (V1, W1); Obtain the volume control documents of this first music according to recorded a series of volume V1 and power W1 corresponding relation (V1, W1) when playing this first audio file.
The described musical sound control method based on audio-frequence player device, wherein, described step S10 also comprises:
S11, convert all V1 in a series of volume V1 recorded when playing the first audio file and power W1 corresponding relation (V1, W1) to identical volume value;
S12, by obtain first audio file play time per interval T power W1 obtain average power W as arithmetic mean, and then obtained the mathematical relation of final output power according to UI Preferences volume by the power W1 of per interval T, obtain the final output power of average power W under various UI Preferences volume;
S13, to come according to the average power W that the obtains final output power under various UI Preferences volume that various with the standard prestored in mobile terminal " final output power corresponding to UI Preferences volume is carried out corresponding, thus makes volume control documents.
The described musical sound control method based on audio-frequence player device, wherein, the volume value V1 that the described user in described step C is arranged: for user is to the volume value set by audio-frequence player device; Describedly actually arranging volume value V2, is the final volume value that audio-frequence player device is arranged voluntarily.
Based on a musical sound control system for audio-frequence player device, wherein, comprising:
Sound control document production module, for arrange according to various volume lower output audio power corresponding relation, the volume control documents arranging the volume that lower described audio file actual needs is arranged for the various volume in recording user interface is set for each audio file;
Detection module, for when start displaying audio file time, first search and whether have the volume control documents corresponding with current broadcasting music;
Volume being reseted module, being had the volume control documents corresponding with current broadcasting music for working as, then obtain the volume value V1 that active user is arranged, in the volume control documents corresponding with current broadcasting music, search corresponding actual of the volume value V1 that arranges with user arrange volume value V2, controlling the volume value that audio-frequence player device arranges current broadcasting music is V2.
The described musical sound control system based on audio-frequence player device, wherein, Sound control document production module comprises:
Detecting unit, for the audio coding according to each audio file self, detects the audio power corresponding relation that the various volume of each audio file arranges lower output;
Setting unit, for arrange according to various volume lower output audio power corresponding relation, the volume control documents arranging the volume that lower described audio file actual needs is arranged for the various volume in recording user interface is set for each audio file, for actual corresponding to the various volume values set by the recording user of the inside, volume is set.
The described musical sound control system based on audio-frequence player device, wherein, Sound control document production module also comprises:
Unit made by volume control documents, for first time be the first audio file volume control documents is set time, first play this first audio file and obtain the volume V1 that active user is arranged and the power W1 obtaining the output of audio-frequence player device sound output every a schedule time T, the power W1 that the sound output of the volume V1 that the active user obtained the same time is arranged and correspondence exports is designated as volume V1 and power W1 corresponding relation (V1, W1); Obtain the volume control documents of this first music according to recorded a series of volume V1 and power W1 corresponding relation (V1, W1) when playing this first audio file.
The described musical sound control system based on audio-frequence player device, wherein, volume control documents is made unit and is comprised:
Play conversion subelement, for converting all V1 in a series of volume V1 recorded when playing the first audio file and power W1 corresponding relation (V1, W1) to identical volume value;
Average power computation subunit, during for being play by the obtain first audio file, the power W1 of per interval T obtains average power W as arithmetic mean, and then obtained the mathematical relation of final output power according to UI Preferences volume by the power W1 of per interval T, obtain the final output power of average power W under various UI Preferences volume;
Unit made by volume control documents, carry out corresponding for carrying out the final output power corresponding with the standard prestored in mobile terminal various UI Preferences volume according to the final output power of the average power W obtained under various UI Preferences volume, thus make volume control documents.
The described musical sound control system based on audio-frequence player device, wherein, the volume value V1 that described user is arranged: for user is to the volume value set by audio-frequence player device; Describedly actually arranging volume value V2, is the final volume value that audio-frequence player device is arranged voluntarily.
Musical sound control method based on audio-frequence player device provided by the present invention and system, have recorded the various volume of user interface and arrange by making one when showing for the first time for each audio file volume that this audio file actual needs lower arranges
volume control documents, then when playing afterwards, only actual volume when this audio file is play need be set according to UI Preferences volume and volume control documents; Can effectively avoid because audio file itself encodes the different audio files that cause identical
user interface volume is arrangedthe defect that lower released actual sound difference is larger.The present invention makes audio-frequence player device increase New function: effectively can solve different audio file of the prior art identical
user interface volume is arrangedthe defect that lower released actual sound difference is larger, there will not be the situation that sound in the process of listening to the music is suddenly big or suddenly small, decreases the frequency that user operation volume adjusting touches the button, provide users with the convenient.
Embodiment
For making object of the present invention, technical scheme and advantage clearly, clearly, developing simultaneously referring to accompanying drawing, the present invention is described in more detail for 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.
Refer to Fig. 1, Fig. 1 is the process flow diagram of the preferred embodiment of the musical sound control method that the present invention is based on audio-frequence player device.A kind of musical sound control method based on audio-frequence player device shown in Fig. 1, comprises step:
Step S110, arrange according to various volume lower output audio power corresponding relation, the volume control documents arranging the volume that lower described audio file actual needs is arranged for the various volume in recording user interface is set for each audio file.
In the embodiment of the present invention, need volume control documents corresponding for each audio file (as music file) in advance.Wherein, the acquisition of corresponding with audio file volume control documents can realize by the following method:
Such as according to the audio coding of each audio file self, detect the audio power corresponding relation that the various volume of each audio file arranges lower output; Such as: by audio-frequence player device as the volume knob of mobile phone etc. is divided into 10 grades from small to large by volume.Play then to an audio file 1, when arranging volume and being grade 1, detecting this audio file 1 output power when volume is grade 1 is how many (if 0.1W), when audio file 1 output power when volume is grade 2 is how many (if 0.2W), the like, until detecting audio file 1 output power when volume is grade 10 is how many (if 1W).Record forms the audio power corresponding relation that the various volume of each audio file arranges lower output.
Then according to various volume arrange lower output audio power corresponding relation, the volume control documents arranging the volume that lower described audio file actual needs is arranged for the various volume in recording user interface is set for each audio file, for actual corresponding to the various volume values set by the recording user of the inside, volume is set.
If, if the various volume of audio-frequence player device user interface arranges the corresponding calibration power exported, when audio volume level is 1, corresponding output power is 0.2W, when audio volume level is 2, corresponding output power is that the inclined code audio sound of 0.4W(and above-mentioned audio file 1 may be less than normal: audio file 1 output power when volume is grade 1 is how many (if 0.1W), and audio file 1 output power when volume is grade 2 is how many (if 0.2W)).When so now user interface is 1 grade volume (corresponding 0.2W), the volume (0.2W) etc. of corresponding displaying audio file 1 should be audio volume level is 2, the like, make volume control documents.
Then step S120. is entered
Step S120, when start displaying audio file time, first search and whether have the volume control documents corresponding with current broadcasting music.
Namely, in the embodiment of the present invention, when starting displaying audio file, first searching in audio-frequence player device and whether having the volume control documents corresponding with current broadcasting music.
Step S130, when there being the volume control documents corresponding with current broadcasting music, then obtain the volume value V1 that active user is arranged, in the volume control documents corresponding with current broadcasting music, search corresponding actual of the volume value V1 that arranges with user arrange volume value V2, controlling the volume value that audio-frequence player device arranges current broadcasting music is V2.
The volume value V1 that user described in the embodiment of the present invention is arranged: for user is to the volume value set by audio-frequence player device; Describedly actually arranging volume value V2, is the final volume value that audio-frequence player device is arranged voluntarily.As connect as described in above-mentioned steps, when the volume value V1 that acquisition active user is arranged and audio volume level are 1, corresponding output power is 0.2W, (and the inclined code audio sound of above-mentioned audio file 1 may be less than normal: audio file 1 output power when volume is grade 1 is how many (if 0.1W), and audio file 1 output power when volume is grade 2 is how many (if 0.2W)).So now search the volume control documents of audio file 1, when the volume value that the user of user interface is arranged is that V1 is as during for 1 grade volume (corresponding 0.2W), the volume (0.2W output) of corresponding displaying audio file 1 should be audio volume level is 2, then control audio-frequence player device arranges final volume value V2 such as the level of sound volume of current broadcasting music is voluntarily 2.
Like this, user, when listening different audio files continuously, there will not be the situation that sound in the process of listening to the music is suddenly big or suddenly small, decreases the frequency that user operation volume adjusting touches the button, provide users with the convenient.
Below by way of a concrete Application Example, the present invention is described in further detail:
This specific embodiment is using mobile terminal as audio-frequence player device.Refer to Fig. 2, Fig. 2 is the specific embodiment process flow diagram of a kind of musical sound control method based on audio-frequence player device of the present invention, and the musical sound control method based on audio-frequence player device described in Fig. 2 embodiment comprises the following steps:
S100, when starting to play a piece of music, first searching the volume control documents whether having this music, if had, performing step S200, if not, perform step S300;
S200, obtain the volume value V1 that active user arranges, in volume control documents, search corresponding actual of this volume value arrange volume value V2, then arranging volume value is V2;
Wherein, the volume value V1 that user is arranged is exactly that user is to the volume value set by mobile terminal; Actually arranging volume value V2, is exactly the volume value that final mobile terminal self is arranged;
In this specific embodiment, described volume control documents, to record corresponding to the various volume values set by user actual in the inside arranges volume, such as mobile terminal loudness has 0 ~ 9 totally ten grades of volumes settings on a user interface, but for different music because himself coding is different, corresponding musical sound volume is set with one-level mobile terminal loudness different, that to be provided with volume be 6 to mobile terminal equally, but sound sounds heavy when music file MUSIC1 plays, when another music file MUSIC2 has play, sound sounds lighter, if actual volume value is set as 5 when being play by MUSIC1, and actual volume value is set as 7 during MUSIC2 broadcasting, then can reach the wave volume effect of user's set volume 6 on a user interface, volume control documents is exactly the file that have recorded above-mentioned corresponding relation, by described in upper example on a user interface mobile terminal loudness have 0 ~ 9 totally ten grades of volumes arrange, then all have a volume control documents to every a piece of music, the inside have recorded user's actual volume of establishing when UI Preferences 0 ~ 9 volume at different levels.
S300, first time play this music file time obtain its volume control documents.
Namely when the audio file that need play does not have volume control documents, first time be the first audio file volume control documents is set time, first play this first audio file and obtain the volume V1 that active user is arranged and the power W1 obtaining the output of audio-frequence player device sound output every a schedule time T, the power W1 that the sound output of the volume V1 that the active user obtained the same time is arranged and correspondence exports is designated as volume V1 and power W1 corresponding relation (V1, W1); Obtain the volume control documents of this first music according to recorded a series of volume V1 and power W1 corresponding relation (V1, W1) when playing this first audio file.
In this specific embodiment, per interval T obtains the volume V1 that active user is arranged, the power W1 obtaining the output of mobile terminal sound output, V1, W1 that the same time obtains are designated as (V1, W1), what deserves to be explained is, (V1, W1) under different time is likely unequal mutually; Then obtain the volume control documents of this song according to recorded a series of (V1, W1) when playing this song; Particularly, comprise the following steps according to the volume control documents obtaining this song according to recorded a series of (V1, W1) when playing this song:
S301, convert all V1 in a series of volume V1 recorded when playing the first audio file and power W1 corresponding relation (V1, W1) to identical volume value.Consider in this specific embodiment that user is in the process playing music, likely adjust volume by user interface, therefore the V1 in a series of (V1, the W1) that obtain may be different, therefore first convert all V1 to identical volume value by a kind of conversion;
This step is actual, and that complete is the power W1 that the mobile terminal sound output of the volume V1 that arranges of known active user and correspondence exports, the power that the mobile terminal sound output obtaining volume that user the arranges correspondence corresponding when other values exports; Such as, known (5, W1) obtains (6, W2) or (8, W3);
How does that change? to explain below.When the source played sound is constant when a certain (namely when playing music the acoustic information inscribed), the power that mobile terminal sound output exports is all then obtain final output power according to the volume settings under user interface through a kind of computing by basic value; As shown in Figure 2:
" source of sound " is exactly need the acoustic information of mobile terminal playing (comprise the coding of volume in this acoustic information, because coding is fixing, therefore the volume that this information comprises itself is fixing);
" base power " is exactly the power that the acoustic information that comprises in the source by sound converts that actual sound exports to, namely the sound that can hear of our people's ear; But " base power " is actual is do not export;
" final output power " is only the power that actual sound exports, and it adjusts " base power " for " base power " basis " UI Preferences volume ", thus obtains " final output power "; Mathematical relation possibility between different mobile terminals that " base power " basis " UI Preferences volume " obtains " final output power " is variant, but is fixing on a mobile terminal; " final output power " is exactly foregoing W1, and " UI Preferences volume " is exactly foregoing V1, therefore, can inverse operation obtain " base power "; The mathematical relation that such as " base power " basis " UI Preferences volume " obtains final output power obtains " final output power " (W1) for " base power " * " UI Preferences volume " (V1), then obtain " base power " for W1/V1 by inverse operation;
By above description, we can obtain according to (V1, the W1) in a moment " base power " in this moment, thus " final output power " corresponding under this moment all " UI Preferences volume " can be obtained;
In order to hereafter describe convenience, unification, make here to obtain inscribing when a series of (V1, W1) obtains these corresponding " base power " according to per interval T in step S301;
In addition, time T is preferably 100 milliseconds;
S302, by obtain first audio file play time per interval T power W1 obtain average power W as arithmetic mean, and then obtained the mathematical relation of final output power according to UI Preferences volume by the power W1 of per interval T, obtain the final output power of average power W under various UI Preferences volume.
Such as, when being play by a piece of music obtained in step S301, " base power " of per interval T obtains WAVG as arithmetic mean, and then the mathematical relation obtaining " final output power " by " base power " basis " UI Preferences volume " obtains " the final output power " of WAVG under various " UI Preferences volume ";
S303, to come according to the average power W that the obtains final output power under various UI Preferences volume that various with the standard prestored in mobile terminal " final output power corresponding to UI Preferences volume is carried out corresponding, thus makes volume control documents.
Such as preserve in advance in the terminal " final output power " that various " the UI Preferences volume " of standard is corresponding; This step completes WAVG " final output power " under various " UI Preferences volume " next " the final output power " corresponding with various " the UI Preferences volumes " of standard obtained according to step S302 and carries out corresponding (carrying out corresponding according to the mode of getting compared with proximity values), thus makes volume control documents; For convenience of understanding, be exemplified below:
If " the final output power " of various " UI Preferences volume " correspondence of the standard of preserving in advance is in the terminal as follows:
The final output power of the corresponding standard of UI Preferences volume 0 is 0
The final output power of the corresponding standard of UI Preferences volume 1 is 10
The final output power of the corresponding standard of UI Preferences volume 2 is 20
The final output power of the corresponding standard of UI Preferences volume 3 is 30
The final output power of the corresponding standard of UI Preferences volume 4 is 40
The final output power of the corresponding standard of UI Preferences volume 5 is 50
The final output power of the corresponding standard of UI Preferences volume 6 is 60
The final output power of the corresponding standard of UI Preferences volume 7 is 70
The final output power of the corresponding standard of UI Preferences volume 8 is 80
The final output power of the corresponding standard of UI Preferences volume 9 is 90
If " final output power " that the WAVG that step S302 obtains is corresponding under various " UI Preferences volume " is as follows:
The final output power of the corresponding standard of UI Preferences volume 0 is 0
The final output power of the corresponding standard of UI Preferences volume 1 is 12
The final output power of the corresponding standard of UI Preferences volume 2 is 24
The final output power of the corresponding standard of UI Preferences volume 3 is 36
The final output power of the corresponding standard of UI Preferences volume 4 is 48
The final output power of the corresponding standard of UI Preferences volume 5 is 60
The final output power of the corresponding standard of UI Preferences volume 6 is 72
The final output power of the corresponding standard of UI Preferences volume 7 is 84
The final output power of the corresponding standard of UI Preferences volume 8 is 96
The final output power of the corresponding standard of UI Preferences volume 9 is 108
Carry out correspondence according to the mode of getting compared with proximity values, the volume control documents obtaining this music file is as follows:
UI Preferences volume 0 is 0 to the actual volume that arranges
UI Preferences volume 1 is 1 to the actual volume that arranges
UI Preferences volume 2 is 2 to the actual volume that arranges
UI Preferences volume 3 is that 4(illustrates to the actual volume that arranges: the most close with 36, the final output power 40 of UI Preferences volume 4 correspondence of standard)
UI Preferences volume 4 is that 5(illustrates to the actual volume that arranges: the most close with 48, the final output power 50 of UI Preferences volume 5 correspondence of standard)
UI Preferences volume 5 is that 6(illustrates to the actual volume that arranges: the most close with 60, the final output power 60 of UI Preferences volume 6 correspondence of standard)
UI Preferences volume 6 is that 7(illustrates to the actual volume that arranges: the most close with 72, the final output power 70 of UI Preferences volume 7 correspondence of standard)
UI Preferences volume 7 is that 8(illustrates to the actual volume that arranges: the most close with 84, the final output power 80 of UI Preferences volume 8 correspondence of standard)
UI Preferences volume 8 is that 9(illustrates to the actual volume that arranges: the most close with 96, the final output power 90 of UI Preferences volume 9 correspondence of standard)
UI Preferences volume 9 is that 9(illustrates to the actual volume that arranges: the most close with 96, the final output power 90 of UI Preferences volume 9 correspondence of standard).
Visible, the present invention have recorded the various volume of user interface and arranges by making one when showing for the first time for each music file volume that this music file actual needs lower arranges
volume control documents, then when playing afterwards, only actual volume when this music file is play need be set according to UI Preferences volume and volume control documents; The method provided by this case can effectively be avoided because music file itself encodes the different music files that cause identical
user interface volume is arrangedthe defect that lower released actual sound difference is larger.Thus improve the Consumer's Experience of user when listening to music.
Based on said method embodiment, present invention also offers a kind of musical sound control system based on audio-frequence player device, as shown in Figure 4, described system comprises:
Sound control document production module 410, for arrange according to various volume lower output audio power corresponding relation, the volume control documents arranging the volume that lower described audio file actual needs is arranged for the various volume in recording user interface is set for each audio file; As detailed above.
Detection module 420, for when start displaying audio file time, first search and whether have the volume control documents corresponding with current broadcasting music; As detailed above.
Volume being reseted module 430, being had the volume control documents corresponding with current broadcasting music for working as, then obtain the volume value V1 that active user is arranged, in the volume control documents corresponding with current broadcasting music, search corresponding actual of the volume value V1 that arranges with user arrange volume value V2, controlling the volume value that audio-frequence player device arranges current broadcasting music is V2; As detailed above.
The described musical sound control system based on audio-frequence player device, wherein, Sound control document production module comprises:
Detecting unit, for the audio coding according to each audio file self, detects the audio power corresponding relation that the various volume of each audio file arranges lower output;
Setting unit, for arrange according to various volume lower output audio power corresponding relation, the volume control documents arranging the volume that lower described audio file actual needs is arranged for the various volume in recording user interface is set for each audio file, for actual corresponding to the various volume values set by the recording user of the inside, volume is set.
The described musical sound control system based on audio-frequence player device, wherein, Sound control document production module also comprises:
Unit made by volume control documents, for first time be the first audio file volume control documents is set time, first play this first audio file and obtain the volume V1 that active user is arranged and the power W1 obtaining the output of audio-frequence player device sound output every a schedule time T, the power W1 that the sound output of the volume V1 that the active user obtained the same time is arranged and correspondence exports is designated as volume V1 and power W1 corresponding relation (V1, W1); Obtain the volume control documents of this first music according to recorded a series of volume V1 and power W1 corresponding relation (V1, W1) when playing this first audio file.
The described musical sound control system based on audio-frequence player device, wherein, volume control documents is made unit and is comprised:
Play conversion subelement, for converting all V1 in a series of volume V1 recorded when playing the first audio file and power W1 corresponding relation (V1, W1) to identical volume value;
Average power computation subunit, during for being play by the obtain first audio file, the power W1 of per interval T obtains average power W as arithmetic mean, and then obtained the mathematical relation of final output power according to UI Preferences volume by the power W1 of per interval T, obtain the final output power of average power W under various UI Preferences volume;
Unit made by volume control documents, carry out corresponding for carrying out the final output power corresponding with the standard prestored in mobile terminal various UI Preferences volume according to the final output power of the average power W obtained under various UI Preferences volume, thus make volume control documents.
The described musical sound control system based on audio-frequence player device, wherein, the volume value V1 that described user is arranged: for user is to the volume value set by audio-frequence player device; Describedly actually arranging volume value V2, is the final volume value that audio-frequence player device is arranged voluntarily.
Musical sound control method based on audio-frequence player device provided by the present invention and system, have recorded the various volume of user interface and arrange by making one when showing for the first time for each audio file volume that this audio file actual needs lower arranges
volume control documents, then when playing afterwards, only actual volume when this audio file is play need be set according to UI Preferences volume and volume control documents; Can effectively avoid because audio file itself encodes the different audio files that cause identical
user interface volume is arrangedthe defect that lower released actual sound difference is larger.The present invention makes audio-frequence player device increase New function: effectively can solve different audio file of the prior art identical
user interface volume is arrangedthe defect that lower released actual sound difference is larger, there will not be the situation that sound in the process of listening to the music is suddenly big or suddenly small, decreases the frequency that user operation volume adjusting touches the button, provide users with the convenient.
Should be understood that, application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can be improved according to the above description or convert, and all these improve and convert the protection domain that all should belong to claims of the present invention.