- Home /
Timing pulses from microphone
Hi Everyone,
I have an electrical pulse running into my mic input which unity can pick up, basically what I want to try and do is record the time between the pulses so if the pulse gets quicker then the time should be recorded as coming down and if the pulse slows down then the recorded time should show the time being longer.
However, I am racking my brain as to how to do it, I have constant running timer using Time.time so really everytime a pulse is detected it should move the old time into the previous time variable and have the new time in the current time variable and then have the difference worked out between the two.
At the moment the current Time and previousTime are always the same or within 0.000016 seconds even if the pulse is 3 seconds later.
Cheers
Supershandy
Your answer
Follow this Question
Related Questions
How can I make an alarm clock? 3 Answers
Analyzing an audio file. 0 Answers
Real time Microphone (line input) FFT analysis 2 Answers
Play audio clip from where it left 0 Answers
Microphone Input Latency Android 1 Answer