Summary of the invention
Main purpose of the present invention is to provide a kind of handheld device according to degrees of shaking control recreation; This handheld device can be exported the sound with the corresponding die-roll of degrees of shaking, solves the problem that existing handheld device can not be reproduced the sound of die-roll really.
For realizing above-mentioned purpose; The present invention provides a kind of handheld device according to degrees of shaking control recreation, comprises a processing unit, a memory cell and a motional induction unit, and this cell stores has a plurality of first kind audio files and comparison list; This first kind audio file is used to simulate and utilizes instrument to shake the sound of dice; This table of comparisons has write down the acceleration range of this handheld device and the corresponding relation of this first kind audio file, and wherein, this processing unit receives the signal that this motional induction unit sends in real time; Confirm the acceleration of this handheld device according to this signal in real time; Thereby confirm the residing acceleration range of this acceleration according to this table of comparisons, and in the time that this acceleration range continues, play and the corresponding first kind audio file of this acceleration range according to this table of comparisons.
Handheld device identification of the present invention is through sensing unit identification acceleration of motion, and output and the corresponding audio file of acceleration of motion, reproduces the different audio that dice sends with the difference of degrees of shaking really.
The specific embodiment
Please refer to Fig. 1, be the hardware structure figure of the handheld device 10 that control is played according to degrees of shaking of the present invention.This handheld device 10 comprises a processing unit 11, a memory cell 12, a motional induction unit 13, a random number generation unit 14 and a decoding unit 15.
This motional induction unit 13 is used for the motion of this handheld device 10 of sensing to obtain the acceleration of handheld device 10, and in this embodiment, this motional induction unit 13 is one can sensing X axle, 3 axle acceleration sensors of Y axle and three directional accelerations of Z axle.
This memory cell 12 stores a plurality of audio file and end audio files of shaking, and each shakes audio file and finish audio file corresponding with a certain acceleration range of this handheld device 10.This shakes audio file and is used to simulate and utilizes instrument to shake the sound of dice, and this end audio file is used to simulate shake and stops the sound that the back dice relies on inertia to roll.
In this embodiment, this shakes audio file and has 4, promptly the first, second, third and the 4th shakes audio file, and its content is to utilize wooden dice handleless cup to shake the sound of dice.Accordingly, finish audio file and have 4, be respectively the first, second, third and the 4th and finish audio file, its content is to shake to stop the back dice at the sound that relies on inertia in wooden dice handleless cup, to roll.
This decoding unit 15 is used for this is stored in the audio file of this memory cell 12 decodes, and converts decoded data signal into analog signal and export.
Please refer to Fig. 2, be acceleration range and this table of comparisons that shakes audio file and finish the audio file corresponding relation that writes down this handheld device 10.This table of comparisons is stored in the memory cell 12; This table of comparisons has write down acceleration range and this corresponding relation that shakes audio file and finish audio file of this handheld device 10; When being in the scope in acceleration 2 districts like the acceleration magnitude when this handheld device 10, corresponding is second to shake audio file and second and finish audio file.Wherein, acceleration 1 district, 2 districts, 3 districts and 4 districts are 4 continuous number ranges, the difference of the severe that is used to represent that this handheld device 10 is shaken.
Understandable, the acceleration that motional induction unit 13 senses is the linear acceleration sensor along X axle, Y axle and Z-direction.And this handheld device 10 is in actual motion; Receive when shaking like this handheld device 10; Its direction of motion is often in any one direction of X axle, Y axle or Z axle, at this moment, and according to the resolution of vectors principle; This acceleration is all important in X axle, Y axle and three directions of Z axle, and promptly this processing unit 11 can be confirmed the acceleration of this handheld device 10 on X axle, Y axle and Z-direction according to the signal of this motional induction unit 13.Therefore, can make 3 acceleration additions on the axle, can confirm the acceleration of this handheld device 10 according to the vector composition principle.
Please refer to Fig. 3, for shaking the pairing acceleration plots of a kind of situation of this handheld device 10.This handheld device 10 receives when shaking; This motional induction unit 13 sends a signal to this processing unit 11; This processing unit 11 is confirmed the acceleration magnitude of this handheld device 10 according to this signal; Thereby confirm the residing acceleration range of this acceleration according to this table of comparisons, and in the time that this acceleration range continues, play and the corresponding audio file that shakes of this acceleration range.
For example in Fig. 3, the acceleration after this handheld device 10 is shaken becomes greatly gradually, and acceleration magnitude has experienced acceleration 4 districts, 3 districts, 2 districts and 1 district.When just beginning to shake; The acceleration of this handheld device 10 is in acceleration 4 districts; Then this handheld device 10 of this processing unit 11 controls is play this and first is shaken file, and in the time that these acceleration 4 districts are continued, this first shakes audio file these handheld device 10 lasting broadcasts.
For make this handheld device 10 more real simulated shake the sound of dice, stop continued shaking of this handheld device 10 and play one and finish audio file.This handheld device 10 is shaken when stopping, the acceleration vanishing of this handheld device 10, but can not get rid of the situation of shaking this acceleration vanishing in the process in this handheld device 10.Therefore; When the acceleration vanishing of this handheld device 10; This this handheld device 10 of processing unit 11 controls continues to play shaking one scheduled time of audio file of before this acceleration vanishing constantly, playing, and shakes audio file accordingly 0.5 second such as continuing to play.If after this scheduled time, this acceleration still is zero, and then this processing unit 11 judges that the motion of this handheld device 10 stops.Then this processing unit 11 is according to the acceleration of a particular moment before this acceleration vanishing constantly, and the acceleration during like constantly preceding 0.2 second of acceleration vanishing is play and the corresponding end audio file of this acceleration.
After this end audio file finishes; This processing unit 11 sends a signal to this random number generation unit 14; This random number generation unit generates the random number of one or more scopes between 1 to 6, and this this handheld device 10 of processing unit 11 controls is through voice mode or this random number of display mode output.