WatchUSeek Watch Forums banner
561 - 574 of 574 Posts

·
Registered
Joined
·
75 Posts
A bug that was causing crashes on Windows was identified and fixed. Might help those who want to try on that operating system. I've made a 0.6.1 release with the fix. You'll still have to compile yourself on Windows unless someone figures out how to make an install package.

Fedora Linux can just add my copr repository, dnf copr enable tpiepho/tg-timer and new versions will show up in the package manager.
 

·
Registered
Joined
·
628 Posts
Finally got around to testing tg on a windows machine, just put the watch on the headphone microphone.
Colorfulness Light Slope Rectangle Organism

The trace looks wonky, I did get some data with my own software and that looks a bit nicer.
Font Slope Pattern Rectangle Terrestrial plant


Could it be that those pretty big wobbles of the escapementwheel throw off the peakdetection?
My method goes as:
I get the black raw data, first thing we do is get the derivative, this highlights the sharpest noise. We take the absolute value since we are interested in the location in time of the tick (or tock).
We smooth out those orange peaks with a gaussian filter and compare the resulting green line with the average pulse shape (differs for tick or tock) in blue. To determine the shift between the two we do a crosscorrelation and find where the peak is. That is the shift.


Rectangle Slope Line Font Parallel
 

Attachments

·
Registered
Joined
·
67 Posts
Hello congratulations. We are interested in your technology contributions.
The wobble or zigzag is because you are using the loudest sound in the waveform. This corresponds to the strike of the locking vane on the escape wheel, which is not perfectly circular. The sound that you must register and with which you would obtain a better graph is that of the impact of the ellipse pin of the steering wheel, in the fork of the lever. That would draw a very clean graph. The same happens with tg, and therefore the path is not clean.
In image 1 that I place you can see the three sounds. The first one, the black line: the unlocking, the second, the blue line: the impulse, and the third in cyan: the drop or lock. Image of Biburo.
Colorfulness Rectangle Font Parallel Slope


In the second image a screenshot of tg, you see the zigzagging trace, because the software uses the loudest sound, coming from the escape wheel and the paddle on its locking face.
Light Black Slope Font Rectangle
 

·
Registered
Joined
·
67 Posts
Additionally, the sound obtained from the headphones is very poor, for this reason the software has difficulty identifying the different sounds produced by the ticking of the clock. It is worth trying to have a better sound coming to the software.
 

·
Registered
Joined
·
75 Posts
Yes, you are seeing the effect of the escape wheel. A longer term plot would show oscillations due to the 4th wheel, 3rd wheel, etc.

Tg's algorithm, as I understand it, is:
  1. Audio is passed through a high pass filter. In my newer version I extended this to an arbitrary chain of biquad filters with an interactive way to set them up.
  2. There is a noise suppressor that removes sounds much louder than the median. I don't think it really does all that much and plan to make an option to turn it off.
  3. The audio is rectified: absolute value taken and then passed through a low pass filter. Then DC offset is removed.
  4. The auto-correlation is computed. But not just of one beat of audio. It uses a 16 second period (actually the signal dots show the period length 2^dots seconds, max 16).
  5. The peak auto-correlation is used to estimate the period. Period means two beats, not just one, so this should be the 2nd peak in the auto-correlation. The first, smaller, peak should be at one beat.
  6. That estimate is used to look for the peaks near two periods, three periods, etc. Until a peak at the expected place isn't found or we get past ⅔ of the 16 second buffer. The peak after 15 periods should be higher that the others if the escape wheel as 15 teeth, because the sounds generated by the same escapement teeth are being compared. I wonder if that can be used to find the number of teeth? Or if the estimate from the number of periods equal to the teeth is more accurate? Instead of timing how long each back and forth of the balance takes, we are timing how long each revolution of the escape wheel takes, by comparing the entire 5 second sound of the escape wheel's revolution, made up of 30 slightly different ticks.
  7. The final period estimate is the mean of the one period peak auto-correlation, two period peak, and so on. The standard deviation of these measurements is also found.
This period estimate is used as the s/d value. So this doesn't use the time of the loudest sound of each beat, to find the time between each beat, and then average ~10 seconds worth of those. It takes the entire ~10 second sound of the escape wheel making about two full revolutions and tries to find the best period to shift it by to optimally align it with itself. Of course, it's more important to align the loud parts than the quiet parts, so it does to some extent mean this is using the locking sound.

Calculation of the beat error, amplitude, and the points where the dots are drawn on the paperstrip is then an even longer series of computations.
 

·
Registered
Joined
·
6 Posts
A bug that was causing crashes on Windows was identified and fixed. Might help those who want to try on that operating system. I've made a 0.6.1 release with the fix. You'll still have to compile yourself on Windows unless someone figures out how to make an install package.

Fedora Linux can just add my copr repository, dnf copr enable tpiepho/tg-timer and new versions will show up in the package manager.
Could I please get some help compiling your version for windows. Everything went smoothly with no errors until I tried running tg-timer from my MSYS64 folder and I was missing some dll files. I copied the dll files from the Program Files (x86)/tg-timer folder and then got the “application was unable to start correctly (0xc000007b)” error. I copied my newly created tg-timer.exe to my Program Files (x86)/tg-timer folder and got the “application was unable to start correctly (0xc000007b)” error. My existing tg.exe (0.5.0) runs fine in the Program Files (x86)/tg-timer folder, but won't run if I copy it to my MSYS64 folder

I new to the windows compiling stuff. Could you please give me some suggestions.
 

·
Registered
Joined
·
3 Posts
Could I please get some help compiling your version for windows. Everything went smoothly with no errors until I tried running tg-timer from my MSYS64 folder and I was missing some dll files. I copied the dll files from the Program Files (x86)/tg-timer folder and then got the “application was unable to start correctly (0xc000007b)” error. I copied my newly created tg-timer.exe to my Program Files (x86)/tg-timer folder and got the “application was unable to start correctly (0xc000007b)” error. My existing tg.exe (0.5.0) runs fine in the Program Files (x86)/tg-timer folder, but won't run if I copy it to my MSYS64 folder

I new to the windows compiling stuff. Could you please give me some suggestions.
Have you tried launching it from within the MSYS64 shell that you compiled it in? From the shell prompt after the successful compile, trying typing ./tg-timer.exe
 

·
Registered
Joined
·
3 Posts
I know @tpiepho you must get inundated with feature requests... and perhaps this isn't a new one. But I was wondering if it'd be possible to somehow show a time series graph of amplitude, beat error, and rate over time? Or short of that, would it be possible to have an option to log these values to a file so that they could be plotted elsewhere? My reason for asking is because I have a case where I'd like to see what my amplitude and beat error are doing as a function of time, specifically I've noticed that the amplitude of my movement drops during the areas indicated in the pic below, but I don't have a way of charting this other than noting the amplitude by hand as each 10s line passes.
Rectangle Font Line Red Parallel
 

·
Registered
Joined
·
6 Posts
Have you tried launching it from within the MSYS64 shell that you compiled it in? From the shell prompt after the successful compile, trying typing ./tg-timer.exe
Thank you for your help.

I didn't. I just tried and nothing happens. No errors, no missing dll's like before. I guess I complied it incorrectly? There were no errors flagged when I compiled it.
 

·
Registered
Joined
·
6 Posts
Thank you for your help.

I didn't. I just tried and nothing happens. No errors, no missing dll's like before. I guess I complied it incorrectly? There were no errors flagged when I compiled it.
I deleted everything in my home folder and restarted. I'm missing two packages now: gtk+-3.0 and glib-2.0.

Reinstalled Msys2. I now get:

configure: error: Package requirements (gtk+-3.0 glib-2.0) were not met:

Package 'gtk+-3.0', required by 'virtual:world', not found
Package 'glib-2.0', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
 

·
Registered
Joined
·
75 Posts
@chp, I don't use windows myself and can't help with windows build issues. I know people have done it. Maybe the building the Linux version on WSL2 would be easier?

@peterhudson That feature does sound familiar. You'll find this branch has some of the features you want. I think also I've considered a few other features that might help.

Exporting data also considered. I've written something to create a jSON dump that I can work at making graphs in matplotlib. I thought, after adding in a Python interpreter to Tg, that maybe that would be the way to make more interesting longer term graphs.
 
561 - 574 of 574 Posts
Top