CN107526510A - sound playing method and device - Google Patents

sound playing method and device Download PDF

Info

Publication number
CN107526510A
CN107526510A CN201610460505.5A CN201610460505A CN107526510A CN 107526510 A CN107526510 A CN 107526510A CN 201610460505 A CN201610460505 A CN 201610460505A CN 107526510 A CN107526510 A CN 107526510A
Authority
CN
China
Prior art keywords
terminal
distance
sound
note
positive
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
CN201610460505.5A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610460505.5A priority Critical patent/CN107526510A/en
Publication of CN107526510A publication Critical patent/CN107526510A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Abstract

The disclosure is directed to a kind of sound playing method and device, belongs to sound and plays field.Methods described includes:By the front of detection terminal with blocking the distance between object, the distance between object is blocked with this according to the front of the terminal and determines note, sound to be played is generated according to the note of determination and preset tones, play sound to be played, can be by finding corresponding note with blocking the distance between object, generate and play sound corresponding to the note, user's operation that analog instruments are played in the terminal is no longer limited to touch-screen or physical button, so as to reach the operation difficulty for reducing user's analog instruments and playing, the effect of Consumer's Experience is improved.

Description

Sound playing method and device
Technical field
This disclosure relates to sound plays field, more particularly to a kind of sound playing method and device.
Background technology
With the continuous development of computer technology, the musical instrument simulation class application based on mobile terminal also becomes more and more popular, pole The big daily entertainment for enriching mobile terminal user life.
In correlation technique, musical instrument simulation class application generally in the operation interface of the touch-screen simulative display of the terminal musical instrument, For example the operation interface can be the key zone or the neck area etc. of guitar of piano, different virtual key in the operation interface Corresponding different note and tone, when user touches a certain virtual key using finger, musical instrument simulation class is applied according to the void Intend note corresponding to button and tone generation musical instrument sound and play.
The content of the invention
In order to overcome problem present in correlation technique, the embodiment of the present disclosure provides a kind of sound playing method and dress Put, technical scheme is as follows:
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of sound playing method, methods described include:
The front of detection terminal is with blocking the distance between object;
Note is determined according to positive and described the distance between object that blocks of the terminal;
Sound to be played is generated according to the note and preset tones of determination;
Play the sound to be played.
Alternatively, described positive and described the distance between object that blocks according to the terminal determines note, including:
Determine the terminal it is positive with it is described block where the distance between object apart from section;
According to described apart from section, and the corresponding relation between section and the note prestored is looked into Ask the note.
Alternatively, methods described also includes:
When the terminal it is positive with it is described block the distance between object change and beyond it is described apart from section when, Note is determined according to the positive and distance blocked after changing between object of the terminal.
Alternatively, methods described also includes:
When positive and described the distance between object that blocks of the terminal is in the basis pre-set in section When, the direction of motion of object is blocked described in detection;
The preset tones are adjusted according to the direction of motion for blocking object.
Alternatively, the preset tones are adjusted the direction of motion that object is blocked described in the basis, including:
When the direction of motion for blocking object is to move closer to the positive direction of the terminal, turn down described default Tone;
When the direction of motion for blocking object is to be gradually distance from the positive direction of the terminal, heighten described default Tone.
Alternatively, the detection terminal front with block the distance between object, including:
The acoustic signals of front side emitter first by from the sound releasing unit of the terminal to the terminal;
The first acoustic signals arrival is received by the microphone unit of the terminal and blocks the second of object back reflection Acoustic signals;
The end is calculated according to the reception parameter of the emission parameter of first acoustic signals and second acoustic signals The positive of end blocks the distance between object with described.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of sound play device, described device include:
First detection module, the front for detection terminal is with blocking the distance between object;
First determining module, note is determined for positive and described the distance between object that blocks according to the terminal;
Sound generation module, for generating sound to be played according to the note and preset tones of determination;
Sound broadcasting module, for playing the sound to be played.
Alternatively, the determining module, including:
Determination sub-module, for determining the positive and distance regions for blocking the distance between object place of the terminal Between;
Note inquire about submodule, for according to described apart from section, and prestore it is described apart from section with it is described Corresponding relation between note inquires about the note.
Alternatively, described device also includes:
Second determining module, change and surpass for positive and described the distance between object that blocks when the terminal Go out it is described apart from section when, note is determined according to the positive and distance blocked after changing between object of the terminal.
Alternatively, described device also includes:
Second detection module, for when the terminal it is positive with it is described block the distance between object be in pre-set Basis in section when, the direction of motion of object is blocked described in detection;
The preset tones are adjusted for tone adjustment module, the direction of motion for blocking object according to.
Alternatively, the tone adjustment module, including:
First regulation submodule, for being move closer to the terminal positive when the direction of motion that block object During direction, the preset tones are turned down;
Second regulation submodule, for being be gradually distance from the terminal positive when the direction of motion that block object During direction, the preset tones are heightened.
Alternatively, the first detection module, including:
Launch submodule, the sound wave of front side emitter first for the sound releasing unit by the terminal to the terminal Signal;
Receiving submodule, shelter is reached for receiving first acoustic signals by the microphone unit of the terminal Second acoustic signals of body back reflection;
Calculating sub module, the reception for the emission parameter according to first acoustic signals and second acoustic signals Parameter calculates the positive of the terminal and blocks the distance between object with described.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of sound play device, described device include:
Processor;
For the memory for the executable instruction for storing the processor;
Wherein, the processor is configured as:
The front of detection terminal is with blocking the distance between object;
Note is determined according to positive and described the distance between object that blocks of the terminal;
Sound to be played is generated according to the note and preset tones of determination;
Play the sound to be played.
The technical scheme that the embodiment of the present disclosure provides can include the following benefits:
By detection terminal front with block the distance between object, according to the terminal front and this block object it Between distance determine note, generate sound to be played according to the note of determination and preset tones, play sound to be played, can By finding corresponding note with blocking the distance between object, generate and play sound corresponding to the note, it is not necessary to detect Operation of the user to touch-screen or physical button, i.e. the user operation that analog instruments are played in the terminal are no longer limited to touch Screen or physical button, so as to reach the operation difficulty for reducing user's analog instruments and playing, improve the effect of Consumer's Experience.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the disclosure Example, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is a kind of flow chart of sound playing method according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of sound playing method according to another exemplary embodiment;
Fig. 3 is a kind of schematic diagram for terminal that embodiment illustrated in fig. 2 is related to;
Fig. 4 is a kind of decay schematic diagram for acoustic signals amplitude that embodiment illustrated in fig. 2 is related to;
Fig. 5 is a kind of schematic diagram of the front of terminal shown in embodiment illustrated in fig. 2 with blocking the distance between object;
Fig. 6 is a kind of interval division of the front of terminal shown in embodiment illustrated in fig. 2 with blocking the distance between object Schematic diagram;
Fig. 7 is a kind of flow chart of sound playing method according to further example embodiment;
Fig. 8 is a kind of schematic diagram of tone regulative mode shown in embodiment illustrated in fig. 7;
Fig. 9 is a kind of block diagram of sound play device according to an exemplary embodiment;
Figure 10 is a kind of block diagram of sound play device according to another exemplary embodiment;
Figure 11 is the block diagram of another device according to an exemplary embodiment.
By above-mentioned accompanying drawing, to show the clear and definite embodiment of the disclosure, will hereinafter be described in more detail.These accompanying drawings It is not intended to limit the scope of disclosure design by any mode with word description, but is by reference to specific embodiment Those skilled in the art illustrate the concept of the disclosure.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of sound playing method according to an exemplary embodiment, the sound playing method Can be applied to equipped with the terminal of detection components, the terminal both can be mobile phone, tablet personal computer, laptop computer, The mobile terminal handy to carry about such as MP3/MP4, point reader, electric paper book or Intelligent bracelet, intelligent glasses, intelligence The wearable smart machines such as wrist-watch, intelligent accessories, it can also be equipped with TV, PC or Baffle Box of Bluetooth apart from detection components etc. Terminal, the sound playing method can include the following steps.
In a step 101, the front of detection terminal is with blocking the distance between object.
In a step 102, the distance between object is blocked with this according to the front of the terminal and determines note.
In step 103, sound to be played is generated according to the note of determination and preset tones.
At step 104, the sound to be played is played.
In summary, the sound playing method that the embodiment of the present disclosure provides, by the front of detection terminal with blocking object The distance between, the distance between object determination note is blocked according to front and this of the terminal, according to the note of determination and Preset tones generate sound to be played, and play sound to be played can be by finding corresponding sound with blocking the distance between object Symbol, generates and plays sound corresponding to the note, it is not necessary to detect operation of the user to touch-screen or physical button, i.e. user The operation that analog instruments are played in the terminal is no longer limited to touch-screen or physical button, finds pleasure in so as to reach to reduce user and simulate The operation difficulty that device is played, improve the effect of Consumer's Experience.
Fig. 2 is a kind of flow chart of sound playing method according to another exemplary embodiment, the sound broadcasting side Method can be applied to equipped with the terminal of detection components, the terminal both can be mobile phone, tablet personal computer, laptop computer, The mobile terminal handy to carry about such as MP3/MP4, point reader, electric paper book or Intelligent bracelet, intelligent glasses, intelligence The wearable smart machines such as wrist-watch, intelligent accessories, it can also be equipped with TV, PC or Baffle Box of Bluetooth apart from detection components etc. Terminal, the sound playing method can include the following steps:
In step 201, the front of detection terminal is with blocking the distance between object.
The front of detection terminal can be embedded in terminal apart from detection components completion with blocking the distance between object , this can be one group of component that can receive and dispatch ultrasonic signal or infrared distance measurement component apart from detection components.
For the time is upper, the front of detection terminal can periodically detect with blocking the distance between object, example As detected the front of a terminal per 50ms with blocking the distance between object.The detection cycle can be according to detection sensitivity Height determines, if such as want to make detection sensitivity higher, shorten detection cycle;If thinking, another detection sensitivity is lower, The then growth detection cycle.
Or terminal using can be plugged in terminal apart from detection components measuring terminals front with block object it Between distance.
Wherein, following scheme can with blocking the distance between object using the front of ultrasonic signal detection terminal Realize.In this case, the component for receiving and dispatching ultrasonic signal is a sound releasing unit and a microphone unit.First, Front side emitter first acoustic signals of the sound releasing unit of terminal to terminal;Afterwards, the microphone unit of terminal receives first Acoustic signals reach the second acoustic signals of testee back reflection;Finally, terminal is according to the emission parameters of the first acoustic signals The distance between the front of the reception parameter computing terminal of second acoustic signals and testee.
In implementation process, the emission parameter of the first acoustic signals of terminal and the reception parameter of the second acoustic signals can be with It is different parameters, different parameters corresponds to different measurement situations, introduces two kinds of modes in the cards herein, division is such as Under.
(1) the acoustic signals amplitude for receiving parameter and emission parameter when including transmitting-receiving respectively.
In this implementation, first, terminal is launched when detecting that terminal starts distance measurement function by the sound of terminal Front side emitter first acoustic signals of the unit to terminal.
So that terminal is mobile phone as an example, start after specifying function to refer to the function that handset starting needs to measure distance, terminal The acoustic signals of front side emitter first from sound releasing unit to the terminal, the front of the terminal refer to terminal with touch screen and Receive the one side of user's touch operation.For example, face where the screen of smart mobile phone is the front of terminal.Now, sound transmitting is single Member faces out the first acoustic signals of transmitting from one where mobile phone screen.
Alternatively, the first acoustic signals can be ultrasonic signal.Wherein, due to the direction signal collection of ultrasonic signal In, thus positive this determination direction transmitting acoustic signals to terminal for being adapted to the embodiment of the present disclosure to provide.Ultrasonic signal Frequency do not limit here, frequency more than 20KHz sound wave can be achieved the embodiment of the present disclosure shown by scheme, frequency can To be 96KHz, 128KHz or 256KHz etc..
Alternatively, the sound releasing unit is the receiver at the top of terminal.
Fig. 3 is refer to, Fig. 3 is a kind of schematic diagram for terminal that the embodiment of the present disclosure is related to.The terminal includes sound hair Penetrate unit 31 and microphone unit 32.
Secondly, the second sound wave of the first acoustic signals arrival testee back reflection is received by the microphone unit of terminal Signal.
It is tested that the terminal receives first acoustic signals arrival after the first acoustic signals are launched, by microphone unit The second acoustic signals after object reflection.Second acoustic signals are that the first acoustic signals run into the formation of testee back reflection, There is identical frequency with the first acoustic signals, because residing propagation medium is identical after reflection, therefore the second acoustic signals and first The spread speed of acoustic signals is also identical.
Alternatively, the microphone unit is the noise reduction microphone at the top of terminal.Herein the position of the microphone unit with it is upper State that the position of sound releasing unit is corresponding, the order of magnitude of the scheme measuring accuracy provided due to the embodiment of the present disclosure is centimetre Level and ultrasonic wave can be considered as along straightline propagation when measuring short distance, therefore designs the sound releasing unit and the microphone unit Position when, should by the installation site between it as close to.Therefore when sound releasing unit is located at terminal top, it is used for Receiving the microphone unit for the reflection wave signal that sound releasing unit launches ultrasonic signal should be arranged on away from its close position Put.Alternatively, the scope of the distance between the noise reduction microphone unit and sound releasing unit within one centimetre.
Alternatively, the position of sound releasing unit and microphone unit can also be arranged in the other positions of terminal, and two The position of person also should be as close as.
Again, between amplitude when amplitude and the second acoustic signals when the first acoustic signals of calculating are launched are received Amplitude difference.
When acoustic signals are propagated in medium (air), the decay of energy is decided by the diffusion, scattering and suction of acoustic signals Receive.In perfect medium, the decay of sound wave comes solely from the diffusion of sound wave, i.e., the distance propagated with acoustic signals increases and caused The decrease of sonic energy signal.When scatter attenuation refers to that ultrasonic wave is propagated in media as well, granular boundary or stream in solid dielectric Suspended particles in body medium make sound wave produce diffraction, and a portion acoustic energy no longer moves along the original direction of propagation, and is formed Scattering.The shape of scatter attenuation and scattering particles, size, quantity, the property of the property of medium and scattering particles are relevant.Absorption declines It is due to medium viscosity to subtract, and ultrasonic wave is caused the interior friction between particle when propagating in media as well, so that a part of acoustic energy Heat energy is converted to, heat exchange is carried out by heat transfer, causes the loss of sonic energy signal.Fig. 4 is refer to, Fig. 4 is the disclosure A kind of decay schematic diagram for acoustic signals amplitude that embodiment is related to, in Fig. 4 the amplitude of acoustic signals with propagation distance increasing Add and reduce.In Fig. 4, A represents the amplitude of acoustic signals, and D represents propagation distance.It should be strongly noted that sound wave shown in Fig. 4 A kind of the graphical of damped manner of the amplitude for being reduced to acoustic signals of signal amplitude schematically illustrates, not to the decay of sound wave Mode forms restriction.
When first acoustic signals are launched, its emission parameter will be recorded in the terminal.Wherein, emission parameter includes first Amplitude when acoustic signals are launched, the average amplitude value when amplitude can be the transmitting of the first acoustic signals, or or First acoustic signals are starting the instantaneous amplitude value of emission time.
Similarly, when the second acoustic signals are received, it receives parameter and will be recorded in the terminal, and the reception parameter includes the Amplitude when two acoustic signals receive, the amplitude can be average amplitude values when the second acoustic signals receive, or can also It is that the second acoustic signals are terminating the instantaneous amplitude value of the time of reception.
Exemplified by the first acoustic signals by sound releasing unit transmitting are 96KHz ultrasonic signals, due to the ultrasonic wave After signal is launched, the amplitude of sound wave is gradually reduced with the increase of propagation distance in atmosphere, the ultrasonic signal it is flat Equal acoustic density is also gradually reduced.Therefore, the amplitude and the first acoustic signals for the second acoustic signals that microphone unit receives The distance that is propagated through of amplitude variations difference and above-mentioned two acoustic signals into positive correlation.The amplitude of second acoustic signals and The amplitude variations difference of one acoustic signals is bigger, and terminal and the distance between testee are longer.
Then, the ambient parameter of terminal surrounding is obtained by the environmental sensor in terminal, ambient parameter includes temperature, sky At least one of air humidity degree or air pressure.
The speed that the amplitude of sound wave is decayed in media as well depends on attenuation coefficient when sound wave is propagated in the medium, and this declines It is relevant to subtract the factors such as coefficient and the material, temperature and density of medium.In this implementation, the first acoustic signals and the rising tone Ripple signal is propagated in atmosphere, and for air, it, which influences the factor of the attenuation coefficient of sonic wave amplitude, mainly includes temperature Degree, air humidity and air pressure etc., therefore, in this implementation, terminal can obtain terminal by environmental sensor first Surrounding includes the ambient parameters such as temperature, air humidity and air pressure.
Then, the attenuation coefficient of amplitude in propagation process of sound wave is obtained according to ambient parameter.
At least one of the temperature, air humidity or the air pressure that are obtained according to above-mentioned measurement ambient parameter, terminal can foundations The corresponding relation pre-set obtains attenuation coefficient.Attenuation coefficient can be according to three said temperature, air humidity and air pressure surveys Value and obtain, can also be obtained according to wherein at least one measured value.
Attenuation coefficient, in addition can without the ambient parameter of measurement in the case of being obtained according to wherein at least one measured value Use preset value.For example, only measure temperature, then air humidity and the corresponding preset value used at this temperature of air pressure.
Then, according to the distance between amplitude difference and the front of attenuation coefficient computing terminal and testee.
In a kind of computational methods in the cards, terminal prestores a list, in the list comprising attenuation coefficient, Corresponding relation between the data of three kinds of the distance between the front of amplitude difference and testee away from terminal, in the list processing side Attenuation coefficient and amplitude difference are continuous value in method, to ensure that the data of a pair of attenuation coefficients and amplitude difference can correspond to Find the distance between the front of testee away from terminal.
A user is prestored in the computational methods of alternatively possible realization, in terminal according to amplitude difference and decay Coefficient calculates the formula in the distance between front of the testee away from terminal, and the formula can be with burning some chip in the terminal In or an integrated application program in the terminal in, using the formula, terminal only needs to input independent variable attenuation coefficient And amplitude difference, you can to obtain the distance between the front of testee away from terminal.
In another computational methods in the cards, terminal can be according to the amplitude of first acoustic signals, according to phase Conversion relation is closed, obtains the acoustic pressure and the sound intensity of the first acoustic signals, and according to the amplitude of the second acoustic signals, converted according to correlation Relation obtains the acoustic pressure and the sound intensity of the second acoustic signals, then together brings the attenuation coefficient obtained in step 205 into formula respectively In (1-1) and formula (1-2).
P2=P1e-kx (1-1)
I2=I1e-2kx (1-2)
Wherein, P1It is the acoustic pressure of the first acoustic signals, P2It is the acoustic pressure of the second acoustic signals;I1It is the first acoustic signals The sound intensity, I2It is the acoustic pressure of the second acoustic signals;K is attenuation coefficient, and x is the distance between the front of testee away from terminal.
Then, according to above-mentioned formula (1-1) and formula (1-2) can calculate between front of the testee away from terminal away from From x.
Alternatively, the terminal can be measured by continuously sending continual acoustic signals by multiple acoustic signals Aggregation of data draws the distance between the front of testee away from terminal, such as to multiple distance values within nearest a period of time Average as the distance between the front of testee away from terminal.Each acoustic signals quilt that sound releasing unit is sent Add a bit of code and form mark, when microphone unit receives the second acoustic signals, terminal can be believed according to the second sound wave The mark in number is come corresponding with each acoustic signals that sound releasing unit is sent.For example, sound releasing unit is continuously sent The mark of acoustic signals institute band be respectively:A1、A2、A3……An, then can be according to A during microphone unit reception acoustic signals1、 A2、A3……An, wait mark corresponding with the signal launched, for example terminal is A in sound releasing unit emission mark1's One group of parameter is have recorded during signal, and is received in microphone unit and is labeled as A1Signal when have recorded another group of data, now This two groups of data are corresponding data, using this two groups corresponding parameters can draw between a front of the testee away from terminal away from From.At the same time, parameter when parameter when terminal launches the acoustic signals of other marks and reception corresponds, will be default The distance between the front of multiple testees away from terminal that the data of group number are calculated is averaged, or uses other numbers The distance between the front of testee away from terminal is drawn according to processing method, is surveyed with reaching using continuous continual acoustic signals The distance between the front of testee away from terminal, avoid because being brought when indivedual sound waves are interfered to whole measurement result The effect of error.
(2) at the time of reception when parameter and emission parameter include receiving and dispatching respectively.
In this implementation, first, terminal is launched when detecting that terminal starts distance measurement function by the sound of terminal Front side emitter first acoustic signals of the unit to terminal.
So that terminal is mobile phone as an example, start after distance measurement function refers to the function that handset starting needs to measure distance, terminal The acoustic signals of front side emitter first from sound releasing unit to the terminal, the front of the terminal refer to terminal with touch screen and Receive the one side of user's touch operation.For example, face where the screen of mobile phone is the front of terminal.
Alternatively, the first acoustic signals can be ultrasonic signal.Wherein, due to the direction signal collection of ultrasonic signal In, thus positive this determination direction transmitting acoustic signals to terminal for being adapted to the embodiment of the present disclosure to provide.Ultrasonic signal Frequency do not limit here, frequency more than 20KHz sound wave can be achieved the embodiment of the present disclosure shown by scheme, frequency can To be 96KHz, 128KHz or 256KHz etc..
Alternatively, the sound releasing unit is the sound transmitting at the top of terminal.
Secondly, the second sound wave of the first acoustic signals arrival testee back reflection is received by the microphone unit of terminal Signal.
It is tested that the terminal receives first acoustic signals arrival after the first acoustic signals are launched, by microphone unit The second acoustic signals after object emission.Second acoustic signals are that the first acoustic signals run into the formation of testee back reflection, There is identical frequency with the first acoustic signals, because residing propagation medium is identical after reflection, therefore the second acoustic signals and first The spread speed of acoustic signals is also identical.
Alternatively, the microphone unit is the noise reduction microphone at the top of terminal.The position of the microphone unit is above-mentioned herein The position of sound releasing unit is corresponding, because the order of magnitude of the scheme measuring accuracy of embodiment of the present disclosure offer is Centimeter Level And ultrasonic wave can be considered as along straightline propagation when measuring short distance, therefore design the sound releasing unit and the microphone unit During position, should by its installation site as close to.It is located between tut transmitter unit at the top of terminal, therefore for receiving sound The microphone unit that sound transmitter unit launches the reflection wave signal of ultrasonic signal should be arranged on away from its proximity.
Alternatively, the position of sound releasing unit and microphone unit can also be arranged in the other positions of terminal, and two The position of person should be as close as.
Include emission time when the first acoustic signals are launched, the rising tone in the emission parameter of first acoustic signals When the reception parameter of ripple signal includes time of reception when the second acoustic signals are received, subsequent operation is performed.
Again, when calculating reception when emission time when the first acoustic signals are launched is received with the second acoustic signals Time difference between quarter.
When first acoustic signals are launched, its emission parameter will be recorded in the terminal.The emission parameter includes the first sound The emission time during transmitting of ripple signal.
Similarly, when the second acoustic signals are received, it receives parameter and will be recorded in the terminal.The reception parameter includes the Time of reception when two acoustic signals are received.
Time of reception when being received according to the emission time during transmitting of the first acoustic signals and the second acoustic signals Difference, obtain time difference T.
Then, the ambient parameter of terminal surrounding is obtained by the environmental sensor in terminal, ambient parameter includes temperature, sky At least one of air humidity degree or air pressure.
The ambient parameter for the terminal surrounding that terminal is obtained by environmental sensor, ambient parameter include temperature, air humidity Or at least one of air pressure.Temperature, air humidity or effects of air pressure atmospheric density, and atmospheric density influences sound wave in atmosphere Spread speed, the spread speed of the more high then ultrasonic wave of density of air is faster, thus want obtain sound wave spread speed Environmental sensor need to be first passed through and obtain ambient parameter.
Then, the spread speed of sound wave is obtained according to ambient parameter.
After the measurement of the above-mentioned ambient parameter including to temperature, air humidity or air pressure, determine the first acoustic signals and The aerial spread speed V of second acoustic signals.
Then, the distance between front and testee of terminal are calculated according to time difference and spread speed.
Can be according to formula D=T*V/2, wherein D represents testee away from the distance between terminal, and T represents the first sound wave letter Number transmitting when time of reception when being received of emission time and the second acoustic signals difference, V represents the first acoustic signals With the aerial spread speed of the second acoustic signals.
Perform complete step 201 after, can according to the terminal front with this block the distance between object determination sound Symbol, the step can be realized by performing step 202 and step 203 successively.
Wherein, the distance between object is blocked with this according to the front of the terminal and determines note, can be according to the terminal Front and block the vertical range between object to determine note, or according to the front of the terminal and block between object The distance of a certain fixed-direction determine note.Fig. 5 is refer to, Fig. 5 is that one kind according to an exemplary embodiment is whole Schematic diagram of the front at end with blocking the distance between object.Fig. 5 is the left view in terminal and the three-view diagram for blocking object.51 It is terminal, 52 to block object, 511 be the front of terminal, 521 is to block positive nearest one side of the object away from terminal, 53 are Vertical range between 511 to 521,54 be the predetermined direction (shown in dotted line) the distance between 511 to 521 along Fig. 5.
In addition, the shape for blocking object can be bluff body, cylinder, polyhedron or irregular polyhedronses.Block object institute Blocking position be in measurement range of the terminal apart from detection components, if terminal measurement distance component is ultrasonic transmission/reception group Part, then block object and be in directly over ultrasonic transmitting-receiving subassembly in a reverse taper space, the vertex of a cone of the reverse taper is received for the ultrasonic wave Send out component;If terminal measurement distance component is infrared distance measurement component, this block object be in the infrared distance measurement component before, can Block the position of the ray of infrared distance measurement component transmitting.
In step 202, determine the terminal front with this block the distance between object place apart from section.
Refer to Fig. 6, Fig. 6 be a kind of front of terminal according to an exemplary embodiment and block between object away from The interval division schematic diagram from a distance from.61 represent the front of terminals where plane, 621~628 represent respectively distance 61 it is different away from From plane.Wherein, the distance of two interplanars adjacent in 621~628 can be between equal such as adjacent 621 and 622 Distance be that the distance between m, 622 and 623 is that the distance between m ... 627 and 628 is m, now the distance between 61 to 621 For n.Then the distance between 61 to 621~628 ask respectively:N, (n+m), (n+2m), (n+3m) ... (n+6m) and (n+7m).
Plane 61 to plane 628 is divided into eight apart from section by above-mentioned 621~628, and this eight are respectively apart from section (0, n], (n, n+m], (n+m, n+2m] ... (n+5m, n+6m] and (n+6m, n+7m].Object and terminal are blocked whenever getting After the distance between plane 61 L where positive, the numerical intervals where the L are detected.Such as L > (n+2m) and L < (n+3m), then Determine L be located at section (n+2m, n+3m] in, the section blocked where the distance between front of object and terminal is (n+2m, n+ 3m]。
Alternatively, two plane distances adjacent in 621~628 can be with unequal, between each two adjacent plane Distance can be configured according to size set in advance.
In step 203, according to this apart from section, and the corresponding relation between section and note prestored Inquire about note.
The corresponding relation between section and note prestored can be one-to-one relationship, i.e. a distance regions Between a corresponding note.According to the section divided in Fig. 6, can be (n, n+m], (n+m, n+2m] ... (n+5m, n+6m] and (n+ 6m, n+7m] seven sections correspond to seven 1 (do), 2 (re), 3 (mi), 4 (fa), 5 (sol), 6 (la) and 7 (si) sounds respectively Symbol.
If the front of terminal to block the distance of object section (n+5m, n+6m] in, then note corresponding to the distance is 6 (la)。
In step 204, sound to be played is generated according to the note of determination and preset tones.
Wherein, the note of the determination is the note that above-mentioned steps 203 inquire.Terminal can according to the note of determination, The type of default tone and musical instrument to be simulated generates the sound of corresponding musical instrument, such as, when musical instrument to be simulated is steel Qin, then generation correspond to the piano sound of above-mentioned note and tone;Or when when the musical instrument simulated is guitar, then generation it is corresponding on State the guitar sound of note and tone.
In step 205, the sound to be played is played.
Terminal can use the horn assembly of itself to play sound or terminal control ratio that abovementioned steps are determined Such as other electronic equipments for being capable of sounding of Baffle Box of Bluetooth play sound.Play sound mode can be measure block object with Play or sequentially played after the note of predetermined number is determined immediately after distance between the front of terminal.It is for example, pre- If the note of quantity is 30, after terminal determines 30 notes, sound corresponding to 30 notes is sequentially played.
Optionally, in the disclosed embodiments, the distance between object is blocked with this when the front of the terminal to change And beyond this apart from section when, note is determined according to the front of the terminal and the distance blocked after changing between object.
Wherein, the front of above-mentioned terminal and the distance blocked after changing between object have two kinds of possible situations.Situation One:User needs to generate sound corresponding to two adjacent notes.Situation two:User needs to generate two non-conterminous notes pair The sound answered, or, user needs to generate sound corresponding to two identical notes.
In situation one, if the front of terminal changes and beyond this apart from section with the distance between object is blocked When, now object is blocked still in the measurement range apart from detection components of terminal apart from section beyond this.For example, terminal Front and block before the distance between object changes section (n+5m, n+6m] in, corresponding note is 6 (la);Afterwards Block the distance between front of object and terminal shortening so that the distance change after section (n+4m, n+5m] in, then Now according to section (n+4m, n+5m] find corresponding to note 5 (sol).
In situation two, if terminal front and block the distance between object change and more than apart from section when, Now object is blocked not in the measurement range apart from detection components of terminal, afterwards not in the terminal apart from section beyond this The measurement range apart from detection components in the object that blocks again return in the measurement range apart from detection components.For example, Terminal front and block before the distance between object changes section (n+5m, n+6m] in, corresponding note is 6 (la);The measurement range apart from detection components that object leaves terminal is blocked afterwards, again returns to the range measurement section of terminal (n+5m, n+6m] (such as the horizontal detection range for removing terminal front side of object, the detection of terminal front side is then moved horizontally into again Scope), now corresponding note is still 6 (la);Or block object return terminal range measurement section (n+2m, n+3m], Now corresponding note is 3 (mi).
In summary, the sound playing method that the embodiment of the present disclosure provides, by the front of detection terminal with blocking object The distance between, determine the front of terminal with block where the distance between object apart from section, according to this apart from section, with And the corresponding relation between section and the note prestored inquires about the note, when terminal front with block object it Between distance change and during beyond apart from section, according to the front of terminal and block the distance after changing between object and determine The note, sound to be played is generated according to the note and preset tones of determination, the sound to be played is played, can pass through Corresponding note is found with blocking the distance between object, generates and plays sound corresponding to the note, it is not necessary to detect user Operation to touch-screen or physical button, i.e. user in the terminal analog instruments play operation be no longer limited to touch-screen or Person's physical button, so as to reach the operation difficulty for reducing user's analog instruments and playing, improve the effect of Consumer's Experience.
Fig. 7 is a kind of flow chart of sound playing method according to further example embodiment, the sound broadcasting side Method can be applied to equipped with the terminal of detection components, the terminal both can be mobile phone, tablet personal computer, laptop computer, The mobile terminal handy to carry about such as MP3/MP4, point reader, electric paper book or Intelligent bracelet, intelligent glasses, intelligence The wearable smart machines such as wrist-watch, intelligent accessories, it can also be equipped with TV, PC or Baffle Box of Bluetooth apart from detection components etc. Terminal, the sound playing method can include the following steps:
In step 701, the front of detection terminal is with blocking the distance between object.
In a step 702, determine the front of terminal with block where the distance between object apart from section.
The implementation procedure of step 701 and step 702 refers to the implementation procedure of step 201 and step 202.
In step 703, when front and this of the terminal block the distance between object be in pre-set it is basic away from During from section, the direction of motion for blocking object is detected.
Basis can be the section nearest in section of all positive delimitations apart from terminal apart from section, also may be used To be the section farthest in section of all positive delimitations apart from terminal.For example, in Fig. 6 section (0, n] or Section (n+6m, n+7m], wherein (0, n] it is apart from the section nearest in section of the front delimitation of terminal, (n+ in Fig. 6 6m, n+7m] it is the section farthest in section delimited in Fig. 6 apart from the front of terminal.
In step 704, the preset tones are adjusted the direction of motion that object is blocked according to this.
Fig. 8 is refer to, Fig. 8 is a kind of schematic diagram of tone regulative mode according to an exemplary embodiment.Fig. 8 is left Represent with the palm 81 of user to block object in the figure of side, represent to block object respectively when the palm 81 of user moves up and down remote The positive position 82 of terminal and the situation of positive position 83 for blocking object proximity terminal.With user's in figure on the right side of Fig. 8 Palm 81 represents to block object, represents to block object with first direction respectively away from terminal when the palm 81 of user moves left and right Apart from certain position 84 that detection components reach and object is blocked with distance detection group of the opposite direction of first direction away from terminal Certain situation of position 85 that part reaches.
Can be any one in following two kinds of situations during step 704 performs.Situation one:When the shelter The direction of motion of body is when moving closer to the positive direction of the terminal, to turn down the preset tones.Situation two:When the screening The direction of motion of block material body is when being gradually distance from the positive direction of the terminal, to heighten the preset tones.
Alternatively, situation one and situation two can also be following situations.Situation one:When the direction of motion for blocking object The monitoring range of terminal detecting distance component is gradually translated out with first direction for the plane where the front parallel to the terminal When, turn down the preset tones.Situation two:When the direction of motion for blocking object is parallel to where the front of the terminal When plane gradually translates out the monitoring range of terminal detecting distance component with the opposite direction of first direction, the default sound is heightened Adjust.
For example, preset tones are the big tune of E.Wherein, turn down tone can be by the big keys of the E it is low one grade to the big tune of D, also may be used To be to turn down two grades to arrive c major.Every time regulation one grade it may is that, as long as the above situation one occurs, no matter distance change Amount is how many, only turns down one grade.If want to turn down more than one grade leaves monitoring model apart from detection components completely, it is necessary to block object After enclosing, it is again introduced into the monitoring range and is adjusted.In addition, once turn down multi gear it may is that default displacement and tune Low one grade of corresponding relation, when blocking object and moving default displacement, that is, turn down one grade, mobile several times it is default it is mobile away from From when, that is, turn down several grades.The operation for heightening tone can refer to the inverse operation progress of aforesaid operations, and here is omitted.
After the preset tones are adjusted in the embodiment of the present disclosure, when the front of the terminal and this block between object When the basis that distance is not at pre-setting is in section, terminal can correspond to the side shown in embodiment according to Fig. 1 or Fig. 2 Method, the corresponding note of the distance between object determination is blocked with this according to the front of the terminal, according to the note and tune of determination Tone after solution generates corresponding sound and played.
In summary, the sound playing method that the embodiment of the present disclosure provides, by the front of detection terminal with blocking object The distance between, determine the front of terminal with block where the distance between object apart from section, when the front of terminal is with hiding When the distance between block material body is in the basis pre-set in section, the direction of motion of object is blocked in detection, according to this The preset tones are adjusted the direction of motion for blocking object, according to this apart from section, and the distance regions prestored Between corresponding relation between the note inquire about the note, change with blocking the distance between object when the front of terminal and Beyond this apart from section when, note is determined according to the front of terminal and the distance blocked after changing between object, according to determination Note and preset tones generate sound to be played, play the sound to be played, can be by with blocking the distance between object Corresponding note is found, generates and plays sound corresponding to the note, it is not necessary to detect user to touch-screen or physical button Operation, i.e., user in the terminal analog instruments play operation be no longer limited to touch-screen or physical button, so as to reach The operation difficulty that user's analog instruments are played is reduced, improves the effect of Consumer's Experience.
Following is embodiment of the present disclosure, can be used for performing embodiments of the present disclosure.It is real for disclosure device The details not disclosed in example is applied, refer to embodiments of the present disclosure.
Fig. 9 is a kind of block diagram of sound play device according to an exemplary embodiment, and the sound play device can It is integrated in by way of hardware circuit or software and hardware combining equipped with the terminal of detection components, the terminal both can be with It is the mobile terminals handy to carry about such as mobile phone, tablet personal computer, laptop computer, MP3/MP4, point reader, electric paper book, also may be used To be the wearable smart machines such as Intelligent bracelet, intelligent glasses, intelligent watch, intelligent accessories, it can also be and examined equipped with distance Surveying terminal, the sound play devices such as TV, PC or the Baffle Box of Bluetooth of component can include:First detection module 901, first is true Cover half block 902, sound generation module 903 and sound broadcasting module 904.
First detection module 901, the front of detection terminal is configured as with blocking the distance between object.
First determining module 902, it is configured as blocking the distance between object determination sound with this according to the front of the terminal Symbol.
Sound generation module 903, it is configured as generating sound to be played according to the note and preset tones of determination.
Sound broadcasting module 904, it is configured as playing the sound to be played.
In summary, the sound play device that the embodiment of the present disclosure provides, by the front of detection terminal with blocking object The distance between, the distance between object determination note is blocked according to front and this of the terminal, according to the note of determination and Preset tones generate sound to be played, play sound to be played, can by with block the distance between object find it is corresponding Note, generate and play sound corresponding to the note, it is not necessary to detect operation of the user to touch-screen or physical button, that is, use The family operation that analog instruments are played in the terminal is no longer limited to touch-screen or physical button, and user's simulation is reduced so as to reach The operation difficulty of instrument playing, improve the effect of Consumer's Experience.
Figure 10 is a kind of block diagram of sound play device according to another exemplary embodiment, the sound play device It can be integrated in by way of hardware circuit or software and hardware combining equipped with the terminal of detection components, the terminal both may be used To be the mobile terminals handy to carry about such as mobile phone, tablet personal computer, laptop computer, MP3/MP4, point reader, electric paper book, It can be the wearable smart machines such as Intelligent bracelet, intelligent glasses, intelligent watch, intelligent accessories, can also be equipped with distance The terminals such as TV, PC or the Baffle Box of Bluetooth of detection components, the sound play device can include:First detection module 1001, One determining module 1002, sound generation module 1003, sound broadcasting module 1004, the second determining module 1005, second detection mould Block 1006 and tone adjustment module 1007.
First detection module 1001, the front of detection terminal is configured as with blocking the distance between object.
First determining module 1002, it is configured as blocking the distance between object determination sound with this according to the front of the terminal Symbol.
Sound generation module 1003, it is configured as generating sound to be played according to the note and preset tones of determination.
Sound broadcasting module 1004, it is configured as playing the sound to be played.
Alternatively, first determining module 1002, including:First determination sub-module 1002a and note inquiry submodule 1002b。
Determination sub-module 1002a, it is configured to determine that the distance between object place is blocked in the front of the terminal with this Apart from section.
Note inquire about submodule 1002b, be configured as according to this apart from section, and prestore this apart from section with Corresponding relation between the note inquires about the note.
Alternatively, the device also includes:Second determining module 1005.
Second determining module 1005, the front for being configured as the terminal are blocked the distance between object with this and changed And beyond this apart from section when, note is determined according to the front of the terminal and the distance blocked after changing between object.
Alternatively, the device also includes:Second detection module 1006.
The distance between object is blocked in advance in second detection module 1006, the front for being configured as the terminal with this When the basis of setting is in section, the direction of motion for blocking object is detected.
Tone adjustment module 1007, the direction of motion for being configured as blocking object according to this are adjusted to the preset tones Section.
Alternatively, the tone adjustment module 1007, including:First regulation submodule 1007a and the second regulation submodule 1007b。
First regulation submodule 1007a, it is to move closer to the terminal to be configured as the direction of motion for blocking object During positive direction, preset tones is turned down
Second regulation submodule 1007b, it is to be gradually distance from the terminal to be configured as the direction of motion for blocking object During positive direction, the preset tones are heightened.
Alternatively, the first detection module 1001, including:
Launch submodule 1001a, be configured as the front side emitter the to the terminal by the sound releasing unit of the terminal One acoustic signals.
Receiving submodule 1001b, it is configured as receiving first acoustic signals arrival by the microphone unit of the terminal Block the second acoustic signals of object back reflection.
Calculating sub module 1001c, it is configured as emission parameter and second acoustic signals according to first acoustic signals Reception parameter calculate the front of the terminal and with this block the distance between object.
In summary, the sound play device that the embodiment of the present disclosure provides, by the front of detection terminal with blocking object The distance between, determine the front of the terminal with this block the distance between object place apart from section, when the terminal just Face with this block the distance between object be in pre-set basis in section when, detect the motion side for blocking object To, the preset tones are adjusted the direction of motion that object is blocked according to this, according to this apart from section, and prestore The corresponding relation between section and the note inquires about the note, when the front of the terminal and this block between object away from From changing and with a distance from this during section, determined according to the front of the terminal and the distance blocked after changing between object Note, sound to be played is generated according to the note and preset tones of determination, plays the sound to be played, can by with screening The distance between block material body finds corresponding note, generates and plays sound corresponding to the note, it is not necessary to detects user to touching The operation of screen or physical button is touched, i.e. user's operation that analog instruments are played in the terminal is no longer limited to touch-screen or reality Body button, so as to reach the operation difficulty for reducing user's analog instruments and playing, improve the effect of Consumer's Experience.
The disclosure additionally provides a kind of sound play device with exemplary embodiment, can realize disclosure above-described embodiment The sound playing method of offer.The device includes:Pond Ritchie, and the memory of the executable instruction for storing processor.
The device can be implemented as equipped with all or part of of the terminal apart from detection components.
The front of detection terminal is with blocking the distance between object;
Note is determined according to positive and described the distance between object that blocks of the terminal;
Sound to be played is generated according to the note and preset tones of determination;
Play the sound to be played.
Alternatively, described positive and described the distance between object that blocks according to the terminal determines note, including:
Determine the terminal it is positive with it is described block where the distance between object apart from section;
According to described apart from section, and the corresponding relation between section and the note prestored is looked into Ask the note.
Alternatively, methods described also includes:
When the terminal it is positive with it is described block the distance between object change and beyond it is described apart from section when, Note is determined according to the positive and distance blocked after changing between object of the terminal.
Alternatively, methods described also includes:
When positive and described the distance between object that blocks of the terminal is in the basis pre-set in section When, the direction of motion of object is blocked described in detection;
The preset tones are adjusted according to the direction of motion for blocking object.
Alternatively, the preset tones are adjusted the direction of motion that object is blocked described in the basis, including:
When the direction of motion for blocking object is to move closer to the positive direction of the terminal, turn down described default Tone;
When the direction of motion for blocking object is to be gradually distance from the positive direction of the terminal, heighten described default Tone.
Alternatively, the detection terminal front with block the distance between object, including:
The acoustic signals of front side emitter first by from the sound releasing unit of the terminal to the terminal;
The first acoustic signals arrival is received by the microphone unit of the terminal and blocks the second of object back reflection Acoustic signals;
The end is calculated according to the reception parameter of the emission parameter of first acoustic signals and second acoustic signals The positive of end blocks the distance between object with described.
It should be noted is that above-described embodiment provide device when realizing its function, only with above-mentioned each function The division progress of module for example, in practical application, can according to be actually needed and by above-mentioned function distribution by different work( Energy module is completed, i.e., the content structure of equipment is divided into different functional modules, to complete whole described above or portion Divide function.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Figure 11 is a kind of block diagram of device 1100 according to an exemplary embodiment.For example, device 1100 can be The terminals such as smart mobile phone, wearable device, intelligent television and car-mounted terminal.
Reference picture 11, device 1100 can include following one or more assemblies:Processing component 1102, memory 1104, Power supply module 1106, multimedia groupware 1108, audio-frequency assembly 1110, the interface 1112 of input/output (I/O), sensor cluster 1114, and communication component 1116.
The integrated operation of the usual control device 1100 of processing component 1102, such as communicated with display, call, data, The operation that camera operation and record operation are associated.Processing component 1102 can include one or more processors 1120 to perform Instruction, to complete all or part of step of above-mentioned method.In addition, processing component 1102 can include one or more moulds Block, the interaction being easy between processing component 1102 and other assemblies.For example, processing component 1102 can include multi-media module, To facilitate the interaction between multimedia groupware 1108 and processing component 1102.
Memory 1104 is configured as storing various types of data to support the operation in device 1100.These data Example includes being used for the instruction of any application program or method operated on device 1100, contact data, telephone book data, Message, picture, video etc..Memory 1104 can by any kind of volatibility or non-volatile memory device or they Combination is realized, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), it is erasable can Program read-only memory (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash memory Reservoir, disk or CD.
Power supply module 1106 provides electric power for the various assemblies of device 1100.Power supply module 1106 can include power management System, one or more power supplys, and other components associated with generating, managing and distributing electric power for device 1100.
Multimedia groupware 1108 is included in the screen of one output interface of offer between device 1100 and user.At some In embodiment, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Touch-screen is may be implemented as, to receive the input signal from user.Touch panel includes one or more touch sensors With the gesture on sensing touch, slip and touch panel.Touch sensor can the not only border of sensing touch or sliding action, But also the duration and pressure that detection is related to touch or slide.In certain embodiments, multimedia groupware 1108 Including a front camera and/or rear camera.When device 1100 is in operator scheme, such as screening-mode or video mode When, front camera and/or rear camera can receive outside multi-medium data.Each front camera and rearmounted shooting Head can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio-frequency assembly 1110 is configured as output and/or input audio signal.For example, audio-frequency assembly 1110 includes a wheat Gram wind (MIC), when device 1100 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone quilt It is configured to receive external audio signal.The audio signal received can be further stored in memory 1104 or via communication Component 1116 is sent.In certain embodiments, audio-frequency assembly 1111 also includes a sound transmitting, for exports audio signal.
I/O interfaces 1112 provide interface, above-mentioned peripheral interface module between processing component 1102 and peripheral interface module Can be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and Locking press button.
Sensor cluster 1114 includes one or more sensors, and the state for providing various aspects for device 1100 is commented Estimate.For example, sensor cluster 1114 can detect opening/closed mode of device 1100, the relative positioning of component, such as group Part is the display and keypad of device 1100, and sensor cluster 1114 can be with 1,100 1 groups of detection means 1100 or device The position of part changes, the existence or non-existence that user contacts with device 1100, the orientation of device 1100 or acceleration/deceleration and device 1100 temperature change.Sensor cluster 1114 can include proximity transducer, be configured to connect in no any physics The presence of object nearby is detected when touching.Sensor cluster 1114 can also include optical sensor, as CMOS or ccd image are sensed Device, for being used in imaging applications.In certain embodiments, the sensor cluster 1114 can also include acceleration sensing Device, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 1116 is configured to facilitate the communication of wired or wireless way between device 1100 and other equipment.Dress The wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof can be accessed by putting 1100.It is exemplary at one In embodiment, communication component 1116 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel Information.In one exemplary embodiment, communication component 1116 also includes near-field communication (NFC) module, to promote junction service. For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) skill can be based in NFC module Art, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 1100 can be by one or more application specific integrated circuits (ASIC), numeral Signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 1104 of instruction, above-mentioned instruction can be performed to complete the above method by the processor 1120 of device 1100.Example Such as, non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and Optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in storage medium is held by the processor of device 1100 During row so that device 1100 is able to carry out the above-mentioned sound playing method by equipped with the terminal execution apart from detection components.
Those skilled in the art will readily occur to the disclosure its after considering specification and putting into practice invention disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledges in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the precision architecture that the disclosure is not limited to be described above and is shown in the drawings, and And various modifications and changes can be being carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (13)

1. a kind of sound playing method, it is characterised in that methods described includes:
The front of detection terminal is with blocking the distance between object;
Note is determined according to positive and described the distance between object that blocks of the terminal;
Sound to be played is generated according to the note and preset tones of determination;
Play the sound to be played.
2. according to the method for claim 1, it is characterised in that described that object is blocked with described according to the positive of the terminal The distance between determine note, including:
Determine the terminal it is positive with it is described block where the distance between object apart from section;
According to described apart from section, and the corresponding relation inquiry institute between section and the note prestored State note.
3. according to the method for claim 2, it is characterised in that methods described also includes:
When the terminal it is positive with it is described block the distance between object change and beyond it is described apart from section when, according to The positive and distance blocked after changing between object of the terminal determines note.
4. according to the method for claim 1, it is characterised in that methods described also includes:
When the terminal it is positive with it is described block the distance between object be in pre-set basis in section when, inspection The direction of motion of object is blocked described in survey;
The preset tones are adjusted according to the direction of motion for blocking object.
5. according to the method for claim 4, it is characterised in that the direction of motion of object is blocked described in the basis to described Preset tones are adjusted, including:
When the direction of motion for blocking object is to move closer to the positive direction of the terminal, the default sound is turned down Adjust;
When the direction of motion for blocking object is to be gradually distance from the positive direction of the terminal, the default sound is heightened Adjust.
6. according to the method for claim 1, it is characterised in that the front of the detection terminal and block between object away from From, including:
The acoustic signals of front side emitter first by from the sound releasing unit of the terminal to the terminal;
The second sound wave for blocking object back reflection is reached by microphone unit reception first acoustic signals of the terminal Signal;
The terminal is calculated according to the reception parameter of the emission parameter of first acoustic signals and second acoustic signals It is positive to block the distance between object with described.
7. a kind of sound play device, it is characterised in that described device includes:
First detection module, the front for detection terminal is with blocking the distance between object;
First determining module, note is determined for positive and described the distance between object that blocks according to the terminal;
Sound generation module, for generating sound to be played according to the note and preset tones of determination;
Sound broadcasting module, for playing the sound to be played.
8. device according to claim 7, it is characterised in that first determining module, including:
Determination sub-module, for determine the terminal it is positive with it is described block where the distance between object apart from section;
Note inquires about submodule, for, apart from section, and being prestored described apart from section and the note according to described Between corresponding relation inquire about the note.
9. device according to claim 8, it is characterised in that described device also includes:
Second determining module, change for positive and described the distance between object that blocks when the terminal and exceed institute When stating apart from section, note is determined according to the positive and distance blocked after changing between object of the terminal.
10. device according to claim 7, it is characterised in that described device also includes:
Second detection module, the base pre-set is in for positive and described the distance between object that blocks when the terminal The direction of motion of object is blocked when plinth is in section, described in detection;
The preset tones are adjusted for tone adjustment module, the direction of motion for blocking object according to.
11. device according to claim 10, it is characterised in that the tone adjustment module, including:
First regulation submodule, for being to move closer to the positive direction of the terminal when the direction of motion for blocking object When, turn down the preset tones;
Second regulation submodule, for being to be gradually distance from the positive direction of the terminal when the direction of motion for blocking object When, heighten the preset tones.
12. device according to claim 7, it is characterised in that the first detection module, including:
Launch submodule, believe for the sound releasing unit by the terminal to the sound wave of front side emitter first of the terminal Number;
Receiving submodule, reached for microphone unit reception first acoustic signals by the terminal after blocking object Second acoustic signals of reflection;
Calculating sub module, the reception parameter for the emission parameter according to first acoustic signals and second acoustic signals Calculate the positive of the terminal and block the distance between object with described.
13. a kind of sound play device, it is characterised in that described device includes:
Processor;
For the memory for the executable instruction for storing the processor;
Wherein, the processor is configured as:
The front of detection terminal is with blocking the distance between object;
Note is determined according to positive and described the distance between object that blocks of the terminal;
Sound to be played is generated according to the note and preset tones of determination;
Play the sound to be played.
CN201610460505.5A 2016-06-22 2016-06-22 sound playing method and device Pending CN107526510A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610460505.5A CN107526510A (en) 2016-06-22 2016-06-22 sound playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610460505.5A CN107526510A (en) 2016-06-22 2016-06-22 sound playing method and device

Publications (1)

Publication Number Publication Date
CN107526510A true CN107526510A (en) 2017-12-29

Family

ID=60735574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610460505.5A Pending CN107526510A (en) 2016-06-22 2016-06-22 sound playing method and device

Country Status (1)

Country Link
CN (1) CN107526510A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108364628A (en) * 2018-01-05 2018-08-03 浙江警察学院 A kind of note controller adjusts the method and system of tone
CN110570832A (en) * 2019-09-29 2019-12-13 湖北美和易思教育科技有限公司 internet-of-things air electronic organ
CN111091820A (en) * 2018-10-23 2020-05-01 辽宁石油化工大学 Flag lifting method and device, storage medium and terminal
CN112584293A (en) * 2018-07-26 2021-03-30 Oppo广东移动通信有限公司 Microphone hole blockage detection method and related product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103777202A (en) * 2013-12-16 2014-05-07 浙江工商大学 Ultrasonic distance measuring method based on damping free vibration
CN103885663A (en) * 2014-03-14 2014-06-25 深圳市东方拓宇科技有限公司 Music generating and playing method and corresponding terminal thereof
CN104154915A (en) * 2014-07-04 2014-11-19 北京搜狗科技发展有限公司 Audio operating method based on intelligent wearable device and intelligent wearable device
US8922519B2 (en) * 2007-01-03 2014-12-30 Apple Inc. Scan sequence generator
CN105242861A (en) * 2015-10-15 2016-01-13 广东欧珀移动通信有限公司 Ultrasonic wave-based parameter adjustment method and device
CN105302302A (en) * 2015-10-15 2016-02-03 广东欧珀移动通信有限公司 Application control method and device
CN105323352A (en) * 2014-06-30 2016-02-10 中兴通讯股份有限公司 Audio adjustment method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8922519B2 (en) * 2007-01-03 2014-12-30 Apple Inc. Scan sequence generator
CN103777202A (en) * 2013-12-16 2014-05-07 浙江工商大学 Ultrasonic distance measuring method based on damping free vibration
CN103885663A (en) * 2014-03-14 2014-06-25 深圳市东方拓宇科技有限公司 Music generating and playing method and corresponding terminal thereof
CN105323352A (en) * 2014-06-30 2016-02-10 中兴通讯股份有限公司 Audio adjustment method and device
CN104154915A (en) * 2014-07-04 2014-11-19 北京搜狗科技发展有限公司 Audio operating method based on intelligent wearable device and intelligent wearable device
CN105242861A (en) * 2015-10-15 2016-01-13 广东欧珀移动通信有限公司 Ultrasonic wave-based parameter adjustment method and device
CN105302302A (en) * 2015-10-15 2016-02-03 广东欧珀移动通信有限公司 Application control method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
童敏明,戴新联: "《现代传感技术》", 31 October 2006 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108364628A (en) * 2018-01-05 2018-08-03 浙江警察学院 A kind of note controller adjusts the method and system of tone
CN112584293A (en) * 2018-07-26 2021-03-30 Oppo广东移动通信有限公司 Microphone hole blockage detection method and related product
CN112584293B (en) * 2018-07-26 2022-04-08 Oppo广东移动通信有限公司 Microphone hole blockage detection method and related product
CN111091820A (en) * 2018-10-23 2020-05-01 辽宁石油化工大学 Flag lifting method and device, storage medium and terminal
CN110570832A (en) * 2019-09-29 2019-12-13 湖北美和易思教育科技有限公司 internet-of-things air electronic organ

Similar Documents

Publication Publication Date Title
CN107978323B (en) Audio recognition method, device and storage medium
US8354997B2 (en) Touchless user interface for a mobile device
CN107257525A (en) Portable terminal and in portable terminal indicate sound source position method
CN107526510A (en) sound playing method and device
CN106093950B (en) Mobile terminal positioning device and method
CN106980486A (en) Method for controlling volume and device
CN107920263A (en) Volume adjusting method and device
CN107749925A (en) Audio frequency playing method and device
US9633638B2 (en) Method and apparatus for simulating a musical instrument
WO2016057943A1 (en) Devices for sharing user interactions
CN107509153A (en) Detection method, device, storage medium and the terminal of Audio Players part
CN108156561A (en) Processing method, device and the terminal of audio signal
CN110992963B (en) Network communication method, device, computer equipment and storage medium
CN111124108B (en) Model training method, gesture control method, device, medium and electronic equipment
CN107506167A (en) Method for controlling volume, device and the storage medium and mobile terminal of mobile terminal
CN108156575A (en) Processing method, device and the terminal of audio signal
CN109618212A (en) Information display method, device, terminal and storage medium
CN110931053B (en) Method, device, terminal and storage medium for detecting recording time delay and recording audio
CN107615206A (en) Using mobile device as based on mobile controller
CN106933366A (en) Bright screen method and device
CN108900694A (en) Ear line information acquisition method and device, terminal, earphone and readable storage medium storing program for executing
CN111524501A (en) Voice playing method and device, computer equipment and computer readable storage medium
CN109599104A (en) Multi-beam choosing method and device
CN107526084A (en) Distance measurement method and device
CN111402844B (en) Song chorus method, device and system

Legal Events

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