WatchUSeek Watch Forums banner

Open source timing software.

280232 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
341 - 360 of 605 Posts
... What microphone and amplifier would you recommend? ...
Hi 24h,

I still use and recommend the Conrad kit no. 197688 (for everybody skilled with a soldering rod) and a cheap guitar pick up clip.

br Klaus
Hi everyone,
And thank you @Contrate_wheel for this software. I've been using it from day 1, and it has been evolving very well since then !

A QUESTION: My old laptop broke and I had to replace it. Now I don't have two separate jack inputs for mic and earphones but only one, which
doesn't fit my mono mic :( I bought a couple of cheap USB audiocards on eBay but I cannot get the mic to work with them. Any experience with
this issue ?!?! THANKS !
Hi avihai,

I got no experience but I haven't any clue.:) Maybe it will help anyway.
if your laptop is some kind of fruit with specific OS then there are special adaptors available. In case of an OS with a sheet glass opening in the wall you have to explain to the system what's plugged.

br Klaus
Hi 24h,

I still use and recommend the Conrad kit no. 197688 (for everybody skilled with a soldering rod) and a cheap guitar pick up clip.

br Klaus
Thanks for the info.
The Korg CM200 clip-on microphone looks like a good option for a mic, but unfortunately I cannot purchase the Conrad 197668 here in the US because they won't ship it here.
Thanks for the info.
The Korg CM200 clip-on microphone looks like a good option for a mic, but unfortunately I cannot purchase the Conrad 197668 here in the US because they won't ship it here.
i simply clipped off the support bracket from a Logitech C270 webcam, then use a rubber band to clamp the watch onto the mic input area - works great on all my laptops, including a Macbook Air (only the USB port is used)

hth,

willie
on the sunny and warm Gulf of Mexico
  • Like
Reactions: 1
Hi All
Saw this on Affordable Watches and thought it may work as a reliable input device for Timegrapher.

I won't receive it for a while so can't comment on the suitability



Frederique Constant FC-ANALYTICS Clip
https://www.ebay.com/itm/273007677197?ul_noapp=true
See less See more
Hi All
Saw this on Affordable Watches and thought it may work as a reliable input device for Timegrapher.

I won't receive it for a while so can't comment on the suitability

Frederique Constant FC-ANALYTICS Clip

https://www.ebay.com/itm/273007677197?ul_noapp=true
Hi,

that object has been mentioned a few times in other sections of the forums. I made a post in this thread https://www.watchuseek.com/f2/frederique-constant-watch-accuracy-device-3798778.html and there are these other threads
https://www.watchuseek.com/f71/frederiqueconstant-analytics-4560289.html
https://www.watchuseek.com/f2/nifty-rate-checker-3791162.html
https://www.watchuseek.com/f2/some-isochronism-testing-4063514.html
Unfortunately nobody really reviewed neither the device nor the associated app.

Note of excuses: I promised to write a post about the internals of TG already more than once, but still I didn't. As it has been observed (Definition of beat error) I am rather slow, and I have too many hobbies. But I didn't forget my promise (yet)...
First, contrite_wheel thank you for developing this software. I basically scrapped my other timegrapher apps in favors of yours. I read the links you posted, and it looks like you ran into people with HUGE egos. So, thank you for your perseverance developing this software.

Instead of using a clip, I decided to go another route. Here is my setup - a notebook running your software, a box of electronics to provide adjustable gain and filtering, and a watch holder modified with a piezo speaker as a sensor.

Technology Electronics Electronic device Gadget Screen


Here is a picture of my amplifier box (with on/off switch and gain knob) and my modified watch holder.

Electronics Technology Auto part Electronic device Wire


Here is a zoom of my modified watch holder. The piezo speaker fits in between the holder's rails. I superglued a small plastic cylinder from a mechanical pencil to the speaker to act as a pickup. The plastic cylinder contacts the watch to pick up the movement's vibrations and won't scratch the watch.

Auto part


Here is a picture with the piezo speaker moved to the side. I used an arch shaped piece of foam with a flat top inside to the holder to push the piezo speaker's pickup against the watch. The holder's spring and bolt fit inside the arch, and the top of the arch is flat to mate against the flat back of the piezo speaker.

Auto part Carburetor Automotive engine part


This holder will allow you to balance the watch in 5 of the 6 measurement positions. When I need to take a measurement with the side of the holder with the bolt and wingnut, I'll set it against something or just hold the holder in that position. I'm working on a device that will let you rotate the holder in all 6 positions.

When I regulate my watches, I place the watch face down in the holder and open the back. I make the adjustments and see my changes on the timegrapher. For example, if your watch is running 20 s/d fast when you wear it and face down measures +15 s/d, you can adjust the face down s/d to be -5 s/d and this will get you close. For this example, I'd actually adjust face down to -4 s/d because I regulate my watches to run 0 to +1 s/d.

I made this setup well over a year ago, and I have to dig up my schematic for my amplifier. I think I had three or four filter/gain stages. The gain of the first stage is set internally by a potentiometer. The final gain is set by the knob on the outside. I used ultra low noise op amps. I didn't need 3 or 4 stages for the gain, but needed them to provide filtering from outside electrical and mechanical noise. I think I used a multi-pole band pass filter from ~500 Hz to 20kHz. This filtered out the 60 Hz and 120 Hz electrical noise and a lot of the room noise (talking, TV, etc.).

I used a quartz watch to perform the calibration as instructed. Then, (here comes the anal part), I checked the calibration of the quart watch over a long period of time and made a tweak to the initial calibration. This is a small ~0.2 s/d tweak to the initial calibration.

If there is a next version, is it possible to:

1) Select the integration time from several choices like the choices from a standalone timegrapher.

2) With a longer integration time, can you display the s/d with one number after the decimal point (e.g, +1.2 s/d).
See less See more
4
  • Like
Reactions: 5
Hi contrate_wheel

I have now received the Frederick Constant Analitics Clip and here is a very short review. (If anyone wants more information please PM me and I'll try and respond with a post here.)

Firstly the app
The app is called SwissConnect Analytics and it's available from the Play Store.
Before one can use the app one needs to create an account and authenticate the FC clip number.
All the data is stored on the Cloud and the phone must be connected to the Cloud to store your additions.
It is a very basic app that is slow to operate but, with the clip it does work.
It has stuff that I'm not interested in like
Purchase Price
Proof of Purchase
Last Service etc
However, others might think that is good.
The app design IMHO is cluncky.
In particular the menu is minimalistic. There is also a (reasonable) requirement to SAVE the readings BUT the Save button is out of the window and I have a 6" screen.
It took me a few goes to figure where my readings went.

The app has a list of manufacturers and models but I would have thought that as they are measuring movements they would have an inbuilt list of calibres with the associated vph and lift angles etc. That is not the case but these can be modified by the user.

How does it work?
On my phone it seems to work fine.
There is a 30 second default measurement time and the app does its thing and it shows a trace of the variation in timekeeping in spd.
Once complete it allows the user to add a description and this is where one needs to add the position of the measurement.
I was expecting that there would be defaults for things like Face Up, Face Down, 3 up, 3 down etc but no! What novice designed the app!!

As mentioned above, the phone needs to be connected to the web to save readings and any new watches added.
Is it a replacement for tg software?
Not in my opinion.
However, If you need to check some watches that maybe you are thinking of purchasing then this will likely be a simple and compact option.
With a bit of clip repositioning it worked on three mechanicals that I tried. (It does not work on quartz)

Other things to note.
I tried using the FC clip on my computer but with no success.
It may be that my Flintstone computer doesn't talk to the clip but the computer and tg work fine with a straight USB web cam mic.

HTH

Hi,

that object has been mentioned a few times in other sections of the forums. I made a post in this thread https://www.watchuseek.com/f2/frederique-constant-watch-accuracy-device-3798778.html and there are these other threads
https://www.watchuseek.com/f71/frederiqueconstant-analytics-4560289.html
https://www.watchuseek.com/f2/nifty-rate-checker-3791162.html
https://www.watchuseek.com/f2/some-isochronism-testing-4063514.html
Unfortunately nobody really reviewed neither the device nor the associated app.

Note of excuses: I promised to write a post about the internals of TG already more than once, but still I didn't. As it has been observed (Definition of beat error) I am rather slow, and I have too many hobbies. But I didn't forget my promise (yet)...
See less See more
  • Like
Reactions: 1
Hi contrate_wheel

I have now received the Frederick Constant Analitics Clip and here is a very short review. (If anyone wants more information please PM me and I'll try and respond with a post here.)

Firstly the app
The app is called SwissConnect Analytics and it's available from the Play Store.
Before one can use the app one needs to create an account and authenticate the FC clip number.
All the data is stored on the Cloud and the phone must be connected to the Cloud to store your additions.
It is a very basic app that is slow to operate but, with the clip it does work.
It has stuff that I'm not interested in like
Purchase Price
Proof of Purchase
Last Service etc
However, others might think that is good.
The app design IMHO is cluncky.
In particular the menu is minimalistic. There is also a (reasonable) requirement to SAVE the readings BUT the Save button is out of the window and I have a 6" screen.
It took me a few goes to figure where my readings went.

The app has a list of manufacturers and models but I would have thought that as they are measuring movements they would have an inbuilt list of calibres with the associated vph and lift angles etc. That is not the case but these can be modified by the user.

How does it work?
On my phone it seems to work fine.
There is a 30 second default measurement time and the app does its thing and it shows a trace of the variation in timekeeping in spd.
Once complete it allows the user to add a description and this is where one needs to add the position of the measurement.
I was expecting that there would be defaults for things like Face Up, Face Down, 3 up, 3 down etc but no! What novice designed the app!!

As mentioned above, the phone needs to be connected to the web to save readings and any new watches added.
Is it a replacement for tg software?
Not in my opinion.
However, If you need to check some watches that maybe you are thinking of purchasing then this will likely be a simple and compact option.
With a bit of clip repositioning it worked on three mechanicals that I tried. (It does not work on quartz)

Other things to note.
I tried using the FC clip on my computer but with no success.
It may be that my Flintstone computer doesn't talk to the clip but the computer and tg work fine with a straight USB web cam mic.

HTH
I've used two android apps in the past: WildSpectra and TickOPrint.

WildSpectra only provides the s/d (no beat error or amplitude). It provides three averages: 5, 30, and 60 seconds for the s/d reading. It provides a numeric valves for each and a graphic display using pointers on a semicircle display. You can adjust the input gain and the bandpass filter endpoints. This was my main app. When the three pointers converge on a s/d you have a pretty good indicator. The only issue I saw was that when I was measuring small s/d every so often the 5 second pointer would move from +5 s/d to -10 s/d, for example, then the 30 second pointer would follow later and the 60 second pointer would bump somewhat later. It was like something ran in the background (like GooglePlayService) and took some resources or the phone's clock was not very stable and created an instant measurement error. I saw the same effect on two phones. On the rooted phone, I changed the clock freq to be fixed at different frequencies and it didn't help. MY guess for larger s/d you might not notice this. Once you recognize the blip, you can just stop and restart the measurement.

TickOPrint provides the dot display, numeric s/d, beat error, and amplitude in the full version. You can change the averaging time. The gain is not adjustable in the latest version. My issue was that I would run the app, and a s/d would converge after a minute or so. Then I would stop and start again (not close and open the app), and I would get different results. Also, the beat error was not consistent. For example, the watch from my previous post above has a consistent 0.1ms beat error on TG Timegrapher, but on TickOPrint it would vary from 0.1 to 2.5 ms. I was feeding an extremely clean signal and I was adjusting the gain of my amplifier, and I could not find a sweet spot to get good consistent results.

Tg Timegrapher gave me consistent results. I also ran the calibration several times on different days with my netbook cold and running for a while and got consistent calibration values. This is why I stopped using my other apps.
See less See more
I was asked why I shoot for a 0 to +1 s/d regulation. I typically measure the s/d in three or four positions. If you wear you watch on your left wrist, I measure stem down, face up, and 12 down. Sometimes, I use a new fourth position where 12 is down by 45 degrees. If you are a desk jockey, this is a common position for your watch during the day. These 3 or 4 positions are pretty consistent with the behavior when you wear the watch. I shoot for slightly positive s/d day to compensate for movement of the watch causing it to slow down slightly. Also, having a slightly positive s/d allows easier setting of the time after a while. You simply pull the stem out to hack the seconds and then press it back in to re-start. If you run a negative s/d, you have to move the minute hand which is more of a pain.
See less See more
Pardon my ignorance - where is the binary for Mac OS? I see that I have to install through the terminal, but don't see the archive to download.
Pardon my ignorance - where is the binary for Mac OS? I see that I have to install through the terminal, but don't see the archive to download.
From what I remember, you don't have to manually download the binaries yourself. It's all though Brew, and I think it will just download the source files from the repository name.

Macintosh

A formula for the Homebrew package manager has been prepared by GitHub user dmnc. To use it, you need to install Homebrew first (instructions on http://brew.sh).

Then run the following command to check everything is set up correctly and follow any instructions it gives you:
Code:
brew doctor
To install tg, run:
Code:
brew install dmnc/horology/tg
You can now launch tg by typing:
Code:
tg-timer &
See less See more
  • Like
Reactions: 2
Thanks - I didn't realize brew was a third party tool. I was extracting the source code and unix binary and not seeing anything named brew (so running a brew command in the extracted directory did nothing). I'm installing now
tks for the OS X install - i just upgraded to High Sierra and basically:

1. uninstalled brew
2. installed brew
3. installed:
'brew install dmnc/horology/tg'

and now i'm back up with tg-timer!

tks!

works great and is a fabulous tool - most appreciated!

willie
on the Gulf of Mexico
See less See more
From what I remember, you don't have to manually download the binaries yourself. It's all though Brew, and I think it will just download the source files from the repository name. ...
Are you aware of any downsides (space, security, whatever) to using Brew (not just for this, but for anything)? I remember some other package system that caused some grief back in the 9 or early 10 days.
Are you aware of any downsides (space, security, whatever) to using Brew (not just for this, but for anything)? I remember some other package system that caused some grief back in the 9 or early 10 days.
Not a security expert, but I wouldn't really worry about it too much. Sure, installing this kind of software on your Macbook may open it up more to attacks but I think the risk is minimal.
The Korg mic didn't work for me until I used a pencil to couple the case back to the mic. I use a Behringer Xenxys 502 mic mixer ($40 on Amazon) into my desktop's mic/line input. The Korg is much noisier than the mics I use for music and voice recording, but the high and low EQ filters on the Behringer allow it to work. I have 13 watches and this rig works on all of them, although sometimes the degree field comes and goes. Sometimes it takes a an adjustment of the mic position and or level controls to get a "green signal," but this setup works and it's pretty cheap.​

Attachments

See less See more
3
The Korg mic didn't work for me until I used a pencil to couple the case back to the mic. I use a Behringer Xenxys 502 mic mixer ($40 on Amazon) into my desktop's mic/line input. The Korg is much noisier than the mics I use for music and voice recording, but the high and low EQ filters on the Behringer allow it to work. I have 13 watches and this rig works on all of them, although sometimes the degree field comes and goes. Sometimes it takes a an adjustment of the mic position and or level controls to get a "green signal," but this setup works and it's pretty cheap.​
You seem to know more about audio than me...
I have some cheap clip on microphones (a few from China and one Korg). When I'm listening to the audio that is picked up, there is a very loud humming noise with some static in the background.
Is this because the wires aren't shielded properly? Is there any way I can cut the current cord out of the microphone and replace it with a better shielded one?
The Korg and other cheap mics are what's called "unbalanced" (two wire) while professional recording technicians use balanced (three wire) cables and connectors. Balanced setups are much lower in noise. The mics that come with time graphing machines are also balanced, but more expensive and more difficult to connect to your computer. In short, the answer is no you can't rewire a cheap unbalanced mix to balanced, but simple tone controls like on my little Behringer mixer/mic preamp can reduce the noise enough to make the program work. Probably the best solution is to simply spend a little more and buy a balanced mic intended for the purpose for $69. You will still need to buy a preamp to interface this balanced mic with your computer. Now we're up around $100 for the mic and the preamp/mixer, which is close to the cost of a complete machine, but I prefer the software to the box.
See less See more
  • Like
Reactions: 1
Are you aware of any downsides (space, security, whatever) to using Brew (not just for this, but for anything)? I remember some other package system that caused some grief back in the 9 or early 10 days.
Brew is very mature now. You used to be able to get in a bit of a mess back in the days of fink and, to a lesser extent, macports after that, but those issues are all nicely worked out now and everything is kept separate from the underlying operating system.

Obviously it will take up a little space but will be very minimal compared to most modern desktop applications.

On security, brew shouldn't be anything to worry about but obviously there is always the possibility you use it to install something malicious. There's a centralised team vetting everything that comes in and you only ever install as yourself rather than a superuser so I'd say the risks are very low. Entirely anecdotal, but in my work we've been using it across a team of around 25 for about five years now and never had any concerns.

Sent from my iPhone using Tapatalk
See less See more
341 - 360 of 605 Posts
Top