Warning: This browser doesn't support navigator.vibrate()

Background: The browser cannot directly control the strength or frequency of the device's vibration motor. However, it can simulate this control by rapidly cycling the vibration motor ON and OFF and by changing the time-length of the ON and OFF phase of each cycle - like a Morse code.

This generator allows you to create and test (feel) these ON/OFF patterns based on your pattern settings (if supported by the browser and device). The vibration motor is accessed with the Javascript function: navigator.vibrate() . Once you discover a pattern you like, copy the Javascript code displayed below.

One cycle includes the time-length of the ON phase (device vibration) and the OFF phase (pause). Each setting effects the time-length of one or both of these two phases, and each setting is measured in milliseconds (except sputter).

The size/grit setting effects only the ON phases, and effects every cycle in the pattern equally. A higher setting is like a larger grit of sand paper. It feels both "louder" - because it increases the ratio of ON over OFF - and rougher - because small changes in power are less noticeable.

The power x time curve effects only the OFF phases, and effects each cycle individually. The horizontal axis covers the duration of the pattern. The lower a point along the curve is on the vertical axis, the longer the OFF phase. At the lowest point, the OFF phase is 25 milliseconds, and at the highest point, it is zero. Therefore, a flat line along the top produces constant vibration.

Control points on the curve are not draggable. Instead, tap anywhere to create to create a new control point, or tap a control point to delete it. You can rotate your device for a larger working area.

The duration of the pattern is the sum all of the ON phases and OFF phases for every cycle in the pattern. Duration is maintained despite the other settings by changing the number of cycles. For example, if the size/grit setting is increased, thereby increasing the time-length of every cycle in the pattern, then the "sample rate" along the power x time curve is decreased.

The sputter setting effects only the ON phases. It adds randomness to the time-length of each cycle. At 0% sputter, the ON time-length is constant throughout the pattern and equal to the size/grit setting. At 100% sputter, each single ON phase is a random time-length between zero the entire duration of the pattern. Just a little sputter is very noticeable and values over 10% aren't useful.

An open source project on GitHub by @mattthew.

Tap pattern to copy to clipboard:

Patterns will display here after any tapping "play >"

Visuals: OFF
Sputter % 0
Size/Grit 0
Duration 0
Power x Time
Visuals: OFF
Sputter % 0
Size/Grit 0
Duration 0
Power x Time
Visuals: OFF
Sputter % 0
Size/Grit 0
Duration 0
Power x Time
Visuals: OFF
Sputter % 0
Size/Grit 0
Duration 0
Power x Time