WatchUSeek Watch Forums banner
1 - 20 of 603 Posts

· Registered
Joined
·
88 Posts
Discussion Starter · #1 ·

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.
 

· Registered
Joined
·
331 Posts
I poked through the source a bit, and have grabbed the windows build. I can't wait to actually try it out, I'll need to dig up the old piezo mic I cobbled together years ago.

Thanks for doing this, especially as FOSS. I started a half-hearted attempt a few years back but became too bored with learning about FFTs to see it through. I'm glad there was someone else out there willing to stick to it.
 

· Registered
Joined
·
88 Posts
Discussion Starter · #3 ·
I poked through the source a bit, and have grabbed the windows build. I can't wait to actually try it out, I'll need to dig up the old piezo mic I cobbled together years ago.
Thanks a lot!

Theoretically, you should not need a piezo. For instance, this
http://ciovil.li/tic4.wav
is one of the test cases that I have been using (it's a weak watch with lots of beat error and dogs, recorded with some regular microphone). If you can get audio of this quality, then the program -- wishful thinking -- should give you some reasonable output. Audio like this one, for instance, also works apparently well (I'm not the author of this video, I just used YouTube as another source of test cases)
This is the mother of all test cases (I'm not the author of this either)
the current version, here, does not lock on the 18000 bph. The 21600 is all over the place, and the amplitude is so bad that it's out of the scale, but that's a problem of the watch, not of the program.

I'm not a Windows user, so the Windows version has not been properly tested. If it gives absolutely no reaction, then just assume that something is wrong with my audio interface. In this case, I would be grateful if you let me know.
 

· Registered
Joined
·
283 Posts
Kudos to you contrate_wheel !!!

Both versions are running perfectly (Win10) I've just finished "playing" with your software for a while with simple and inexpensive hobbyist equipment (small amplifier ~10€ + battery ~75ct + guitar pick-up-clip ~2€ + some cables from my junk box + some soldering)

The algorythm for filtering noise and calculating timesignal IMHO seems to be crazy good.
I recently adjusted one of my watches using biburo and today checked it using your new programm. My conclusion: 100% plug-and-play :) 100% working :) 100% fun :)

I try to add some pictures (upload-newbie ... sorry if it fails)

Wire Electronics Technology Electronic device Gadget

Text Line Font Technology Pattern
3H
Text Line Font Technology Oscilloscope
6H
Text Line Font Technology Diagram
9H
Text Line Font Technology Design
12H
Text Font Line Design Technology
CH
Text Font Line Technology Oscilloscope
FH
 

· Registered
Joined
·
952 Posts
good working but i cant see the amplitude values here, are they available because its an must information of how good the watch is repaired/condition
 

· Registered
Joined
·
331 Posts
good working but i cant see the amplitude values here, are they available because its an must information of how good the watch is repaired/condition
While that information would be wonderful, for me the app is still very useful without it because I usually work on older watches with low beat rates and I can get a good idea of the amplitude by eye. It would be great to have an exact, and accurate, value though, so I hope that our friend is able to add that feature sometime.
 

· Registered
Joined
·
283 Posts
Please correct me if I'm wrong. I guess the amplitude is given.
Testing another watch (that I cleaned about 1 1/2 year ago and just wound up) a difference is visible (marked in screenshot). In my opinion it'll give about 300° to the one side and about 280° to the other.
Is my speculation right that the hairspring is not exactly in the middle of the pins?

Text Line Font Technology Oscilloscope
 

· Registered
Joined
·
88 Posts
Discussion Starter · #9 ·
Please correct me if I'm wrong. I guess the amplitude is given.
Testing another watch (that I cleaned about 1 1/2 year ago and just wound up) a difference is visible (marked in screenshot). In my opinion it'll give about 300° to the one side and about 280° to the other.
Is my speculation right that the hairspring is not exactly in the middle of the pins?

First of all, many thanks to you for your review, and also to the other
participants of this thread.

You are absolutely right that the amplitude is given, and also on the
method to read it. The decision not to show the amplitude in a numerical
format is actually deliberate. In fact, you pointed out quite clearly one
of the reasons that lead me to this decision: let me describe it more in
detail for the rest of the readers. The amplitude, as your figure
demonstrates quite clearly, is determined by the timing of the first pulse
of each tic or toc (relative to the third pulse, and also by the lift
angle, etc.). It happens quite often that this timing is not consistent
between the tics and the tocs, so the tics suggest an amplitude of, for
instance in your case, 300 deg, and the tocs of 280. Some difference is,
actually, almost always there. So what can we say about the amplitude in a
case like this? Honestly, the only correct statement, is that we estimate
the amplitude to be about 280-300 degrees. Any more precise figure, like
293 or something, would be a misrepresentation. This is not a deficiency
of the algorithm: you can check with Audacity, for instance, that the tics
and the tocs are actually different. The data is quite simply not there.

In conclusion, I elected to let the user, with his human brain and his
common sense, do the pattern matching and read the amplitude off the
graphs. That is in keeping with the principle of producing only
information that can be understood and checked, no magic numbers. In
conclusion, for me, it is a feature, not a deficiency.

On the other hand, I started this thread precisely to know your opinions
about this program, so I am very interested to know if you find that this
was a bad choice.

About the reason of the difference, you suggest that it is because the gap
between the pins is too large. I have completely no idea. Maybe sometimes
the actual (as opposed to nominal) lift angle of the tics and the tocs is
slightly different due to manufacturing tolerances, the banking pins being
a little out of symmetry, or some other form of the multifarious
phenomenon known as bad luck. I would love to read the opinion of a
watchmaker.
 

· Registered
Joined
·
88 Posts
Discussion Starter · #11 ·

Thanks a lot, Ocram, for testing on newer Windows systems, and also for
your "like" and your review. I have a penchant for doing idle blah blah on
this forum, so you will excuse me if I take your screenshot as an
opportunity to indulge.

You pointed out exactly the kind of use case that I had in mind! Cheap
consumer mic, and a diver case that, I believe, does not help. If we
imagine an absolute beginner, he will almost invariably be more or less in
such conditions. At least I was in these conditions (and I still am an
absolute beginner at best). The only option that one can trust and does
not involve some form of commitment is to use generic audio editing
programs like Audacity. This method is sure, but so slow and boring that
even I (despite being thorough _and_ slow) became discouraged.

Also one can see in your screenshot my other reason not to include a
numeric display for the amplitude. When the audio is bad, it might be
still possible to get the rate and the beat error, but the amplitude is
often lost because the first pulse is to weak to come through the noise.
The user can read the graphs and decide very easily, but, at least for me,
to design an algorithm that reliably does that is a nightmare (or perhaps
a dream). And also pointless, because the user can do it better than the
machine anyway.


 

· Registered
Joined
·
88 Posts
Discussion Starter · #12 ·

Hi my friends!

Just a little update: I fixed a bug in the algorithm that prevented it
from locking in some situations, and I made a small change to the
interface. Download link, the same.
http://ciovil.li/tg.zip

I really appreciated the enthusiastic reviews of Klaus and Ocram (Marco?),
however I would like to find the remaining bugs and call it v.1.0. So
anyone who tries it and is dissatisfied will have my gratitude if he drops
a line, even by PM. Any critical opinion is welcome. (However please
update to the latest version.)

By the way, I am becoming addicted to test every random watch from
Youtube: it makes even a noob like me feel like I have the elusive BCB.
And you don't get this with any other program! For eye-candy, here you
have one with birds, I suppose, and severe positional variation.

Line Font Technology Slope Pattern

 

· Registered
Joined
·
121 Posts
Hi Contrate_wheel,

Your program looks neat. It might have been a different thread, but I think you were suggesting compiling for OSX would be trivial.

Could you post instructions on how to do this? I am running OSX 10.10.4 if that is of interest.
 

· Registered
Joined
·
952 Posts

Hi my friends!

Just a little update: I fixed a bug in the algorithm that prevented it
from locking in some situations, and I made a small change to the
interface. Download link, the same.
http://ciovil.li/tg.zip

I really appreciated the enthusiastic reviews of Klaus and Ocram (Marco?),
however I would like to find the remaining bugs and call it v.1.0. So
anyone who tries it and is dissatisfied will have my gratitude if he drops
a line, even by PM. Any critical opinion is welcome. (However please
update to the latest version.)

By the way, I am becoming addicted to test every random watch from
Youtube: it makes even a noob like me feel like I have the elusive BCB.
And you don't get this with any other program! For eye-candy, here you
have one with birds, I suppose, and severe positional variation.

View attachment 5972098
as i said could you add the amplitude even the average one, that would mean a lot to the more serious hobbyst's .

br emso
 

· Registered
Joined
·
88 Posts
Discussion Starter · #15 ·
Hi Contrate_wheel,

Your program looks neat. It might have been a different thread, but I think you were suggesting compiling for OSX would be trivial.

Could you post instructions on how to do this? I am running OSX 10.10.4 if that is of interest.
I can not write instructions because I don't have a mac to experiment with, but, if you want, let's try it!

So, you need to be able to compile C99, if you have make and pkg-config things will be easier, and you need to link with gtk+2, portaudio2, and fftw3. There are multiple ways to achieve this, either installing the development tools and libraries sparately, or using some distribution that packages all of them. When I had a mac (centuries ago), I used FINK (Fink - Home), and they seem to be still alive.

In short, you need (1) being confortable with the command line, (2) a working development environment, as in "beeing able to compile hello-world", (3) it's better to have make and pkg-config, (4) gtk+2 -- version 3 might also work, (5) portaudio2 and fftw3.

To make progress I need to know at which step you are...
 

· Registered
Joined
·
88 Posts
Discussion Starter · #16 ·
as i said could you add the amplitude even the average one, that would mean a lot to the more serious hobbyst's .

br emso
Thanks, you made me reconsider my design a bit.

As Klaus demostrated, the amplitude is there, it's just not written as a number. For instance, in the screenshot above (pretending that the lift angle 52 is correct: I didn't look it up), the amplitude is about 155 deg.

I have three questions:
1 - Did you try the program on your setup?
2 - Was it hard to read the amplitude from the graph (if yes, screenshot or even better sound sample would be appreciated)?
3 - Why do you feel that the number is better than the picture?

The third is not a rethorical question. Users are king, so if users really prefer a number, then I will see what I can do to get it!
 

· Registered
Joined
·
952 Posts
Thanks, you made me reconsider my design a bit.

As Klaus demostrated, the amplitude is there, it's just not written as a number. For instance, in the screenshot above (pretending that the lift angle 52 is correct: I didn't look it up), the amplitude is about 155 deg.

I have three questions:
1 - Did you try the program on your setup?no but i believe it will work i'm in process of building the microphone
2 - Was it hard to read the amplitude from the graph (if yes, screenshot or even better sound sample would be appreciated)?its very difficult to spot it and to a beginner it would be difficult and errors might occur, numerical values are what the people are used to (from other timing softwares and machines) and would prefer, rarely anyone sees the soundwaves, especially if there is no very difficult defect to find
3 - Why do you feel that the number is better than the picture? in working environment there is no time to analyze the picture

The third is not a rethorical question. Users are king, so if users really prefer a number, then I will see what I can do to get it!
my answers in red

br
emso
 

· Registered
Joined
·
283 Posts
I have three questions:
1 - Did you try the program on your setup?
2 - Was it hard to read the amplitude from the graph (if yes, screenshot or even better sound sample would be appreciated)?
3 - Why do you feel that the number is better than the picture?
@1 setup as shown in first picture
@2 let me say ... depending ... I tried to add some soundfiles to show you why, but have not been able to upload them o|
@3 to have an unreliable number is not as helpful as a reliable graph. I prefer to decide by myself if the amplitude can be read from the raw-data. An additional value in form of a number would be fine.

This screenshot is a combination showing both, your timegrapher and biburo.

Text Font Line Technology Parallel


The signal from this watch is quite good, even if the caseback is still closed. Reason might be, that the movement is fit directly into the case without a casing-ring made of plastic.

A Promaster with closed caseback gives a weak signal and therefore I would not trust an average amplitude value. To get an even better signal I usually open the caseback and contact the pick-up-clip directly to the movement, which will give a stronger signal, therefore allow to reduce amplification and consequently reduce the noiselevel.

Text Line Font Technology Electronic device


Maybe I'll think about servicing this watch some day (at least adjust the repére).

Text Line Font Technology Pattern


(some soundfiles for the "addicted" will follow if you can give a "how-to-upload" ;-) )
 

· Registered
Joined
·
88 Posts
Discussion Starter · #20 ·
@1 setup as shown in first picture
@2 let me say ... depending ... I tried to add some soundfiles to show you why, but have not been able to upload them o|
@3 to have an unreliable number is not as helpful as a reliable graph. I prefer to decide by myself if the amplitude can be read from the raw-data. An additional value in form of a number would be fine.
Thank you. I was actually asking these questions specifically to Emso, yet your answers are very welcome!

I agree with you. I will try to add a numerical value, without subtracting anything from the current design. As you see, one needs to devise an algorithm smart enough to decide whether the numerical amplitude is reliable (and then show it) or not. I have definitely to think and experiment, but it would be stupid not to try.

Your sound samples would definitely help me immensely. In particular the good ones. By the way, if anyone is interested in contributing to this project, real world samples are the thing that I need more.

I don't know how to upload them on the forum, if possible at all. As you can see I am a noob. You could put them in Dropbox, or somewhere else on the public internet, and post a link. Feel free to PM if you don't like posting it. I will also send you my e-mail by PM, so you can e-mail them to me, if you prefer. If you can, use an uncompressed format (zipped .wav is OK), and take at least 30 seconds.

Thanks again!
 
1 - 20 of 603 Posts
Top