WatchUSeek Watch Forums banner

Open source timing software.

280230 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
221 - 240 of 605 Posts
Hi DMNC,

Is there a way of creating an icon that calls Terminal and then TG-Timer? It would be nice just to click the icon and away we go!

Thanks

Snake
Hi!

Just open the script editor and type the following code:

tell application "Terminal"
do script "tg-timer"
end tell
Save as app, and there you go! You can add an icon later on through the finder.

Text Blue Font Computer icon Software


Anyway, just downloaded this app, I haven't used it a lot but it seems to be working pretty well with a cheap phone handsfree kit.
It's struggling to pick up some diver's noise but it seems to be working great on other watches.
I'll try tomorrow with a piezo mic but so far so good.

Keep up the good work!
See less See more
  • Like
Reactions: 2
Welcome to the forums johnnyrelou, and thank you for your instructions!
Thanks guys, I've been lurking this forum for too long it was a good opportunity to finally create an account. I'm glad I could help!
I just wanted to say thank you for this awesome software. I use it extensively to monitor my watches.
Keep up with the good work and thank you for making this open source.
fyi folks:

SECOND UPDATE: i'd like to thank WUS member 'Apollo83' for his post in this thread, which shows the use of a Logitech webcam as a sound input device - after going through this thread twice i had a 'smack the forehead' moment when i realized i had one of these in a drawer - works under OS X and Raspbian (Debian GNU/Linux) - and now i have a much cleaner input source than the cheap lapel mic i had been futzing with - so thank you, sir!

Text Technology Font Electronics Pattern


UPDATE: tg-timer builds and runs just fine under the Raspberry Pi's Raspbian Debian ARM distro... i have it installed on an RPi3 with a CMedia USB mic input and 3.5" TFT LCD (client is run via a VNC screen-sharing session due to resolution constraints) - a little timing device for less than US$60!

very nice!

ORIGINAL:

- the Win7+ .msi version of tg installs and runs just fine under CrossOver on OS X 10.10.5....

(now off to find a decent mic)

+1 to the developer - very good work

willie
on the open-source Gulf of Mexico
See less See more
  • Like
Reactions: 1
A mic from a timegrapher wouldn't work with this? Just curious while trying to read what everyone has used so far.
I don't see why it wouldn't. I have two old Vibrograf mics and one has the original Rochelle salt microphone element and one modified with a modern piezo disc. The original one is much more sensitive, but they both work.
I don't see why it wouldn't. I have two old Vibrograf mics and one has the original Rochelle salt microphone element and one modified with a modern piezo disc. The original one is much more sensitive, but they both work.
What's kinda plug do you have on them? I have a watchmaster mic that has a 1/4 inch male plug, was thinking of getting a modern one and converting the plug into headphone plug to work with this.
What's kinda plug do you have on them? I have a watchmaster mic that has a 1/4 inch male plug, was thinking of getting a modern one and converting the plug into headphone plug to work with this.
The original Vibrograf plugs are proprietary, and they're both different. I actually had to make a suitable plug from scratch to fit my old B100.

For the TG, I just changed one of the cables to a standard shielded microphone cable and a ¼" mono plug connector, which then plugs into my Apogee Duet interface. The type of plug you need of course depends on what you want to plug your microphone into. Mine is an ideal scenario, since I have two separate mono 1/4" instrument inputs in my audio interface.

If your microphone has a standard 1/4" plug, all you really need is a 1/4" to 3.5mm headphone adapter to fit most sound cards.
The original Vibrograf plugs are proprietary, and they're both different. I actually had to make a suitable plug from scratch to fit my old B100.

For the TG, I just changed one of the cables to a standard shielded microphone cable and a ¼" mono plug connector, which then plugs into my Apogee Duet interface. The type of plug you need of course depends on what you want to plug your microphone into. Mine is an ideal scenario, since I have two separate mono 1/4" instrument inputs in my audio interface.

If your microphone has a standard 1/4" plug, all you really need is a 1/4" to 3.5mm headphone adapter to fit most sound cards.
Could you take some photos and share them?
Sure. I'll do that later today. I have some work to do now.
Sure. I'll do that later today. I have some work to do now.
Okay cool, thanks vary much Aku Ankka.
OK, so here's my modified cable for the Vibrograf mic. The nice thing about these mics is that you can just unscrew the whole cable and swap it to another similar mic. Anyway, this is the end result:

Tool Pneumatic tool Wire Heat guns Soldering iron


This is what goes inside the mic. The springy part is just an electrical connector and the spring allows it to bend as you change the position of the clamp. The knurled part is the negative terminal, which is connected to the shielding braid of the cable. In my case, the cable is two pole, and the white lead is not connected to anything. The red lead is connected to the positive terminal, which is the springy bit.
Tool accessory Tool Microphone Drill accessories Rotary tool


This is the other end of the cable. The red lead (positive) is connected to the center pin and the shielding braid (negative) is connected to the other terminal, which is basically the whole larger metal portion of the plug.

Auto part Pipe Metal


And finally, if your mic already happens to have a 1/4" plug, you could just use one of these headphone adapters if your sound card/interface only has 3.5mm input jacks. You don't need to worry about the adapter being stereo. You're simply using just one of the two channels and the other one is shorted to ground.

Cable Electronic device Technology Speaker wire Coaxial cable
See less See more
4
  • Like
Reactions: 2
OK, so here's my modified cable for the Vibrograf mic. The nice thing about these mics is that you can just unscrew the whole cable and swap it to another similar mic. Anyway, this is the end result:

View attachment 10112258

This is what goes inside the mic. The springy part is just an electrical connector and the spring allows it to bend as you change the position of the clamp. The knurled part is the negative terminal, which is connected to the shielding braid of the cable. In my case, the cable is two pole, and the white lead is not connected to anything. The red lead is connected to the positive terminal, which is the springy bit.
View attachment 10112274

This is the other end of the cable. The red lead (positive) is connected to the center pin and the shielding braid (negative) is connected to the other terminal, which is basically the whole larger metal portion of the plug.

View attachment 10112314

And finally, if your mic already happens to have a 1/4" plug, you could just use one of these headphone adapters if your sound card/interface only has 3.5mm input jacks. You don't need to worry about the adapter being stereo. You're simply using just one of the two channels and the other one is shorted to ground.

View attachment 10112362
Perfect, exactly what I had in mind. Vary much appreciated Aku Ankka, I dont think that this has been posted on this page yet so maybe people can get an idea. Awesome
Not a problem. It's a very simple mod and even if one doesn't have much experience with electronics, it's still very much doable on a very limited budget.
Now that I've been playing around with the software a bit, I thought I'd throw a few development suggestions out there:


-Average rate calculation over a period of time, say 1, 5 and 10 minutes for example. This is what the Witschi software does, and it is extremely handy. Ideally you should let the watch stabilize for something like 30 seconds to a minute and only then the software starts measuring. While the Witschi software does this automatically, TG could just have a button that you could click to start the selected measuring period. Once you have measured in 'all' six positions, you can easily read the results and draw your conclusions from them.

-Possibility to print out the results would be nice.
Now that I've been playing around with the software a bit, I thought I'd throw a few development suggestions out there:

-Average rate calculation over a period of time, say 1, 5 and 10 minutes for example. This is what the Witschi software does, and it is extremely handy. Ideally you should let the watch stabilize for something like 30 seconds to a minute and only then the software starts measuring. While the Witschi software does this automatically, TG could just have a button that you could click to start the selected measuring period. Once you have measured in 'all' six positions, you can easily read the results and draw your conclusions from them.

-Possibility to print out the results would be nice.
Was gonna say printing would be cool.
Hi my friends!

Unfortunately I had very little time to play with tg lately... I would just say thanks to all of you for your feedback.

@linux.author: I'm happy to learn that tg works on ARM!

@Aku Ankka, nauz: Long term averaging and printing are definitely on the to-do list!
  • Like
Reactions: 3
Just to answer my own question and to bring up this thread - this setup works just fine. It doesn't need a preamp and that piezo mic seems to be less prone to ambient noise than a regular iPhone headset.

Electronics Electronic device Technology Wire Cable


1. Piezo Clip On Microphone Pickup for Acoustic Guitar (~$4)
2. Mono 1/4" female to 1/8" male adapter (~$1)
3. 3.5mm Male TRRS to 2 Female TRS Audio Connector TRRS Y Splitter Cable Adapter (~$2)
4. Vintage MacBook Pro (already owned).

The vital part is that TRRS adapter as you can't just plug your mono mic (TS) into the headphones jack, it won't work.

Also there's a neat little software called LineIn (free) that allows you to hear what TG hears, just plug your headphones into the second TRRS adapter jack.
See less See more
  • Like
Reactions: 1
221 - 240 of 605 Posts
Top