WatchUSeek Watch Forums banner
  • Take part in a short activity and share your valuable opinion on new design concepts for AVSForum! >>> Click Here

Open source timing software.

280321 Views 604 Replies 139 Participants Last post by  tpiepho

Hi guys,

I have a more or less usable version of my timing program that is ready
for initial testing, if anyone is interested.

First the goodies. Here are Windows binaries
http://ciovil.li/tg.zip
and here is the full source code
https://github.com/vacaboja/tg

Now some info on the program. This program is released under the GNU GPL
license, version 2 -- basically you can do what you want with it, free of
charge, no warranty, if you redistribute a (modified) version, you must
distribute also the source code. If you want to build from source, you
need gtk+ (I'm using v. 2.24), portaudio2, and fftw3, plus a C99 compiler
clearly. If you want to run the Windows version, just download the zip
archive, unzip, double click.

This program tries to pick up audio from the default audio input of your
computer, which should be the same that Audacity defaults to, so you can
test the audio setup with Audacity. It does not fiddle with the volume:
just check that it is set to a reasonable level. Of course the rate that
you get from this program, for any watch, is affected by the rate of the
clock of your sound card: the same holds for all timing programs and there
is no escape (except calibrating the card against a reliable time source).

The algorithm I decided to use is quite hungry of computing power, so I
made two versions: "tg" is the full version, "tg-lt" is a lighter version.
The light version sacrifices some accuracy and noise resilience for speed.

My intended audience is amateurs and tinkerers. This program has not been
written for professionals, neither do I want to compete with
professionally built hardware or software, nor with those that can write
better software on their own. In particular I have set to myself the
following three goals.

One. Try a less conventional algorithm to deal with bad audio, at the
expense of lots of number crunching (all other programs for which I did
find information online use possibly some band pass filter and a threshold
trigger, we do it differently). I can currently obtain satisfactory
results from the internal mic of my ThinkPad and a few other lower quality
mics. I don't know how it will perform with a good piezo, but I am
interested (probably, for clean audio, mine is not the best approach).
Your mileage may vary.

Two. To avoid complaints like this one
Review: TickoPrint Android App | Watch Guy
the entire operation of the algorithm is designed to be double-checkable.
In particular, the waveforms that the program associates to the tics and
tocs of the watch are shown in real time, so one can check that they are
properly recognized and properly aligned. The slope representing the
currently detected instantaneous rate is drawn (the blue lines) on the
timing-machine-like graph, etc. See also the discussion here for some
example of such double checking
https://www.watchuseek.com/f6/definition-beat-error-2394130.html

Three. Make it open source, so other people can tinker with the source
code (well, this one was the easy part).

Usage should be quite intuitive for those that know how an escapement
works. See also the thread referenced above for more info.

That's all for now. Any feedback is appreciated.
See less See more
  • Like
Reactions: 5
541 - 560 of 605 Posts
Hi! Finally I decided yo try the timegrapher and make me one with the simple circuit of Guido.

Some doubts that maybe you can help me.
- I tried to compile the 0.6 version, but I wasn't able to make the msi file, any hints about how to do it??

- About the amplifier with the piezo + the simple circuit of Guido, I was able to get good results but: is it better to try to find a preamp like Pyle pp444? Any similar in AliExpress?

Thanks!
Hi! Finally I decided yo try the timegrapher and make me one with the simple circuit of Guido.

Some doubts that maybe you can help me.
- I tried to compile the 0.6 version, but I wasn't able to make the msi file, any hints about how to do it??

- About the amplifier with the piezo + the simple circuit of Guido, I was able to get good results but: is it better to try to find a preamp like Pyle pp444? Any similar in AliExpress?

Thanks!
Hello @lednicazar, welcome. About the compilation of the program, I think someone with more knowledge than mine will contribute something.
About the preamp alternative, I'll look something up. But if you can detail what you've done, I think we can help.
Hello Guido, first of all thanks for the answer and sorry to not being able to answer before...(crazy work weeks outside home ....)
This weekend I had some more time to play, I get good results but something rare is happening because I only get results when I touch with the finger the watch..... Maybe some issue with the grounding... But I'm not finding the issue...

Till now I'm using the bc549 + 12mm piezo and some resistors between 1MOhm and 330k... I'm trying to find the best results.
And to get the sound instead of using the pc soundcard Im using an usb sound adaptor
only get results when I touch with the finger the watch.....

Hello @lednicazar, we have to keep trying. Rectify the electronic circuit to get a reasonable signal. The excitement comes later when you can properly hear and register the ticking of the clock. If I can help you with something with pleasure.
You mean that maybe I need more amplification???
To me is strange that I only get good level when I put my finger over the metal case of the watch (that's what's makes me suppose a grounding issue).
Tomorrow I will try to check more stuff
Well, it's funny what you explain about how the signal improves when you put your finger on the watch case. If you could share a picture of your circuit with us, maybe we can see something.
The spectrograms in my latest version will do a good job of letting you see how good your signal is. Both signal level and background noise. I've also added a tppm display to help with adjusting levels, but that version isn't released yet.
Updated TG with new features available for those who can build it.

contrate_wheel hasn't responded to activity on github for almost a year, so I've put together a version with all my work that's finished.

It's available as source on github, and if one is using Fedora there are binary packages on COPR. Building from source is quite trivial on Linux and MacOS and there are instructions in the README.

New features:
  • BPH values down to 8100 will work.
  • Significant performance improvement. Should be over twice as fast now.
  • Alternate layout with horizontal paperstrip can be toggled, allowing for a larger paperstrip with a greater length of displayed time.
  • Free zoom on the paperstrip beat scale. Instead of being fixed at a tenth of a beat, it can freely zoom from one beat to one hundredth of a beat.
  • Division between paperstrip and waveforms can be dragged to make one or the other larger.
  • Audio device setup dialog that allows choosing input device and audio sample rate.
  • High-pass filter cutoff frequency can be adjusted.
  • A few bug fixes and internal improvements.
Hi friend,
I compiled your code in Windows 10 but everytime I try to start the exe file I get the same error : "The application was unable to start correctly (0xc000007b). Click OK to close the application."
I already searched all the web , installed DirectX runtimes , installed Net Framework runtimes . checked process monitor , checked dependency walker to find out what is the cause but so far no luck. Any ideas why the compiled exe file gives this error ?
Hi friend,
I compiled your code in Windows 10 but everytime I try to start the exe file I get the same error : "The application was unable to start correctly (0xc000007b). Click OK to close the application."
I already searched all the web , installed DirectX runtimes , installed Net Framework runtimes . checked process monitor , checked dependency walker to find out what is the cause but so far no luck. Any ideas why the compiled exe file gives this error ?
Ok i managed to get it running through msys2 , it doesn`t work directly from exe file but that`s fine.
Thank you for your contribution to this great tool friend! I appreciate it a lot.
  • Like
Reactions: 1
Sorry, I don't use Windows myself, so don't know what the issue might be. I have zero issues on Linux and MacOS.
Hello @lednicazar, we have to keep trying. Rectify the electronic circuit to get a reasonable signal. The excitement comes later when you can properly hear and register the ticking of the clock. If I can help you with something with pleasure.
Finally I received the components to build the amp of the "Watch-O-Scope" website, and with that I get good results.

Ok i managed to get it running through msys2 , it doesn`t work directly from exe file but that`s fine.
Thank you for your contribution to this great tool friend! I appreciate it a lot.
I'm in the same situation as you. I'm trying to compile in windows the new version, i get the tg-timer.exe file but is not working. How do you execute that on windows??

Is not possible to build the .msi file?? Any knows how to compile that to get the windows msi?

Thanks btw for the software is wonderfull!!!
Windows installation file is readily available from the download site Tg timegrapher - download page. Is there a good reason to build it from the source?
Windows installation file is readily available from the download site Tg timegrapher - download page. Is there a good reason to build it from the source?
Yes! To try the 0.6 version from tpiepho
With this device, does background noise affect the reading too much or this device has noise reduction (aside from the amplification that it has?

Am considering buying this device from Aliexpress, just don't know how much effective if it compared to a good mic and wrapping the watch in a towel.
With this device, does background noise affect the reading too much or this device has noise reduction (aside from the amplification that it has?

Am considering buying this device from Aliexpress, just don't know how much effective if it compared to a good mic and wrapping the watch in a towel.
The device has the characteristic that it is not exactly a microphone. Rather it is a vibration sensor. The vibrations are taken from the case, so almost any background noise is eliminated, unless it is very intense. Let's illustrate it. A normal conversation cannot be recorded by the device. But if you run a finger over the surface of the sensitive components you will hear perfectly. In my opinion, it is a purchase that is appropriate, as it will allow you to better hear the interior of a watch. It will also deliver a suitable sound to tg software or any other like watch-o-scope, or Biburo.
  • Like
Reactions: 1
The device has the characteristic that it is not exactly a microphone. Rather it is a vibration sensor. The vibrations are taken from the case, so almost any background noise is eliminated, unless it is very intense. Let's illustrate it. A normal conversation cannot be recorded by the device. But if you run a finger over the surface of the sensitive components you will hear perfectly. In my opinion, it is a purchase that is appropriate, as it will allow you to better hear the interior of a watch. It will also deliver a suitable sound to tg software or any other like watch-o-scope, or Biburo.
Thanks, that's all I needed to know. I've placed an order already for this. Was afraid it was just like an ordinary mic and the purchase would have been useless and money that could have been saved for a proper timegrapher.
  • Like
Reactions: 1
Thanks, that's all I needed to know. I've placed an order already for this. Was afraid it was just like an ordinary mic and the purchase would have been useless and money that could have been saved for a proper timegrapher.
We would like you to publish and share the results of your trial. They are very useful to the community. Greetings and success.
  • Like
Reactions: 2
We would like you to publish and share the results of your trial. They are very useful to the community. Greetings and success.
I will once I get the item and get it to work. At the same time, I really don't have a baseline to compare it with so... It's just something for me to tinker with. Thanks
  • Like
Reactions: 1
I posted a review of this microphone last year here, D. I. Y. Watch Timing Machine.

There's some more discussion about it in the thread that follows.
  • Like
Reactions: 2
541 - 560 of 605 Posts
Top