Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

🕐 Clock Tick Detector

A modern, web-based clock tick detector that analyzes the timing accuracy of mechanical clocks using your computer's microphone. Works in any browser without requiring installation!

License: MIT Browser Support

✨ Features

  • 🌐 Web-based - No installation required, works in any modern browser
  • 🎤 Real-time audio analysis - Uses Web Audio API for precise microphone input
  • 📊 Live visualization - Real-time charts and statistics with Chart.js
  • ⚡ Auto-calibration - Automatically adjusts sensitivity based on your environment
  • 📈 Time drift analysis - Shows how fast/slow your clock will be over time
  • 📄 PDF reports - Export detailed analysis reports
  • 📱 Mobile friendly - Works on phones and tablets
  • 🎨 Modern UI - Beautiful, responsive interface

🚀 Quick Start

  1. Download the index.html file
  2. Open it in any modern web browser
  3. Allow microphone access when prompted
  4. Place a clock near your microphone
  5. Click "Start Detection" (5-second countdown will begin)
  6. Watch the real-time analysis!
  7. Stop manually or let it auto-stop after 1 minute

That's it! No installation, no setup, no dependencies. 🎉

🎯 How It Works

Audio Processing

  • Uses the Web Audio API to access your microphone
  • Real-time analysis of audio amplitude using RMS (Root Mean Square)
  • Adaptive threshold detection based on sensitivity settings
  • Automatic tick recognition using amplitude spikes

Analysis Features

  • Tick counting - tracks number of detected ticks
  • Interval calculation - measures time between ticks
  • Statistical analysis - average, standard deviation
  • Status determination - ON TIME, RUNNING FAST, or RUNNING SLOW
  • Time drift projections - shows drift after 1 hour, 1 day, 1 week
  • Live visualization - real-time chart with reference lines

Recording Features

  • 5-second countdown - gives you time to prepare
  • Recording timer - shows elapsed time during detection
  • Manual or auto-stop - choose 1-minute auto-stop or manual control
  • Real-time feedback - live audio level monitoring

⚙️ Settings

Setting Default Range Description
Expected Interval 1.0s 0.1-10.0s Your clock's expected tick interval
Tolerance 0.1s 0.01-1.0s Acceptable variation before marking as fast/slow
Sensitivity 1.0 0.1-2.0 Detection sensitivity (higher = more sensitive)
Recording Mode Manual Manual/1min Manual stop or 1-minute auto-stop

📊 Understanding Results

Status Indicators

  • 🟢 ON TIME - Average interval is within tolerance
  • 🔴 RUNNING FAST - Average interval is shorter than expected
  • 🟡 RUNNING SLOW - Average interval is longer than expected

Statistics

  • Ticks Detected - Total number of clock ticks detected
  • Average Interval - Mean time between ticks
  • Standard Deviation - Measure of timing consistency
  • Time Drift - Projected time gain/loss over periods

Chart

  • Blue line - Actual tick intervals over time
  • Green dashed line - Expected interval
  • Red dotted lines - Tolerance boundaries

🔧 Troubleshooting

Microphone Issues

  1. Check browser permissions - allow microphone access when prompted
  2. Check system settings - ensure microphone is enabled in your OS
  3. Try a different browser - Chrome and Firefox work best
  4. Check microphone selection - ensure correct microphone is selected

Detection Issues

  1. No ticks detected?

    • Increase sensitivity (try 1.5 or 2.0)
    • Move clock closer to microphone
    • Reduce background noise
    • Use "Auto-Adjust Sensitivity" feature
  2. False detections?

    • Decrease sensitivity (try 0.5 or 0.8)
    • Increase tolerance
    • Reduce background noise
    • Adjust clock position

🌍 Browser Compatibility

Fully Supported

  • ✅ Chrome 66+
  • ✅ Firefox 60+
  • ✅ Safari 11+
  • ✅ Edge 79+

Mobile Support

  • ✅ iOS Safari
  • ✅ Android Chrome
  • ✅ Mobile Firefox

🔒 Privacy & Security

  • No data sent to servers - everything runs locally in your browser
  • No installation required - no software installed on your system
  • Microphone access only - no other permissions required
  • Open source - you can inspect all the code

📱 Mobile Usage

The web version works great on mobile devices! Just:

  1. Open the index.html file in your mobile browser
  2. Allow microphone access
  3. Place your phone near the clock
  4. Start detection

Note: Mobile devices may have different microphone characteristics, so you might need to adjust sensitivity settings.

🎨 Customization

The web version is easily customizable:

  • Colors - modify CSS variables in the <style> section
  • Layout - adjust grid and flexbox properties
  • Charts - customize Chart.js options
  • Detection algorithm - modify the JavaScript tick detection logic

📄 PDF Reports

Generate detailed PDF reports including:

  • Session information and settings
  • Analysis results and statistics
  • Time drift projections
  • Complete tick interval data table
  • Charts and visualizations

🎯 Best Use Cases

Perfect For:

  • Quick testing - no setup required
  • Demonstrations - works on any computer
  • Mobile devices - works on phones/tablets
  • Basic analysis - simple clock timing checks
  • Teaching - easy to share and use
  • Clock enthusiasts - analyze mechanical clock accuracy
  • Watchmakers - test timing precision
  • Students - learn about time measurement

🚀 Getting Started

Option 1: Direct File

  1. Download index.html
  2. Double-click to open in your default browser
  3. Allow microphone access
  4. Start detecting!

Option 2: Drag and Drop

  1. Open any web browser
  2. Drag index.html into the browser window
  3. The application loads immediately

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📞 Support

If you encounter any issues or have questions:

  1. Check the troubleshooting section above
  2. Open an issue on GitHub
  3. Try the "Auto-Adjust Sensitivity" feature

Made with ❤️ for clock enthusiasts everywhere! 🕐✨

About

Simple webpage to measure timing of clocks using system microphone

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages