Audio Motion Correlation Visualizer

Visualize correlation between audio and device motion in real-time

Real-Time Correlation Analysis

Correlation Coefficient
--
-1.0 -0.5 0.0 +0.5 +1.0
Audio Status Inactive
Motion Status Inactive
Audio Level -- dB
Motion Magnitude -- m/s²
Audio Amplitude Over Time
Acceleration Magnitude Over Time
Note: This tool requires both microphone and motion sensor access. On iOS devices, tap "Request iOS Permission" first, then "Start Analysis". Your device must have an accelerometer (most smartphones and tablets do).

Correlation Interpretation

Correlation ValueInterpretationExample
+0.8 to +1.0 Strong positive correlation Shaking a maraca - sound increases with motion
+0.5 to +0.8 Moderate positive correlation Walking while talking - some synchronization
-0.2 to +0.5 Weak or no correlation Unrelated sounds and movements
-0.5 to -0.8 Moderate negative correlation Noise cancellation - movement reduces sound
-0.8 to -1.0 Strong negative correlation Motion dampens audio (inverse relationship)

How It Works

This tool simultaneously captures two streams of data: audio amplitude from your microphone and acceleration magnitude from your device's accelerometer. Both signals are displayed in real-time on synchronized graphs.

Correlation Calculation

The correlation coefficient is calculated using Pearson's correlation formula, which measures the linear relationship between the two signals. The formula compares how the audio and motion values change together over a sliding time window.

r = Σ[(x - x̄)(y - ȳ)] / √[Σ(x - x̄)² × Σ(y - ȳ)²]

Where x represents audio samples, y represents motion samples, and x̄ and ȳ are their means.

Data Collection

  • Audio: Sampled using the Web Audio API, measuring RMS (root mean square) amplitude in decibels
  • Motion: Collected via DeviceMotionEvent API, calculating the magnitude of 3-axis acceleration (√(x² + y² + z²))
  • Synchronization: Both signals are sampled at the same rate and aligned in time for accurate correlation

Practical Applications

Musical Instruments

Test percussion instruments to see how movement correlates with sound output. Shakers, tambourines, and drums should show high positive correlation.

Vibration Analysis

Analyze machinery or appliances to understand if vibration is causing audible noise. High correlation indicates vibration-induced sound.

Microphone Isolation Testing

Test how well your microphone rejects handling noise. Low correlation means good isolation from physical movement.

Educational Demonstrations

Demonstrate the relationship between physical motion and sound waves in physics or music classes.

Quality Assurance

Verify that motion-triggered devices (like impact sensors or vibration alarms) respond correctly to physical input.

Tips for Accurate Measurements

  • Hold your device naturally - gripping too tightly can dampen motion sensors
  • Let the analysis run for at least 10-15 seconds to collect sufficient data
  • For motion-sound correlation tests, create deliberate movements (shake, tap, wave)
  • Background noise and ambient motion will affect readings - test in a controlled environment when possible
  • The correlation coefficient updates continuously - watch for patterns rather than instantaneous values
  • Reset between tests to clear historical data and start fresh

Frequently Asked Questions

What does a correlation of 0 mean?

A correlation near zero means there is no linear relationship between audio and motion. The sounds you're hearing are not related to the device's movement patterns.

Why do I need iOS permission?

Starting with iOS 13, Apple requires explicit user permission to access motion sensors (accelerometer and gyroscope) for privacy reasons. This is a one-time permission that applies to the website domain.

What if my device doesn't have an accelerometer?

Most smartphones and tablets have built-in accelerometers. Desktop computers typically do not. If your device lacks motion sensors, the tool will display an error message when you try to start analysis.

Can I test recorded audio or video?

No, this tool only works with live microphone input and real-time device motion. It's designed for analyzing the current relationship between sound and movement.

Why is the correlation value fluctuating?

The correlation coefficient is calculated over a sliding window of recent samples, so it naturally fluctuates as new data comes in and old data ages out. Look for general trends rather than exact values.

Does this tool record or store my data?

No. All processing happens entirely in your browser in real-time. No audio or motion data is transmitted, recorded, or stored anywhere.

Privacy & Limitations

Privacy: This tool runs entirely in your browser. All audio and motion data is processed locally in real-time. Nothing is transmitted to any server, and no data is stored or recorded.

Limitations: Correlation measures linear relationships only. Complex non-linear patterns may not be captured. Environmental factors (background noise, ambient vibration) can affect accuracy. The tool provides correlation values but does not determine causation - high correlation does not prove one signal causes the other.

Related Tools

Related Tools

View all tools

Audio Motion Correlation Visualizer FAQ

What does this tool measure?

This tool measures the correlation between audio input (from your microphone) and device motion (from the accelerometer). It shows how synchronized sound and movement are, with values from -1 (inverse correlation) to +1 (perfect correlation).

What is correlation coefficient?

The correlation coefficient is a statistical measure ranging from -1 to +1. A value near +1 means audio and motion are highly synchronized, near 0 means no relationship, and near -1 means they move in opposite directions.

Why is iOS permission needed?

iOS 13+ requires explicit user permission to access motion sensors (accelerometer, gyroscope) for privacy reasons. Tap the "Request iOS Permission" button to grant access.

What are practical uses for this tool?

Use cases include analyzing musical instruments (does shaking correlate with sound?), testing vibration motors, studying appliance noise, checking microphone isolation from physical vibration, and educational demonstrations of sound and motion physics.

Request a New Tool
Improve This Tool