iOS developer & learning

Core Haptics AHAP editor

Add taps and buzzes on a timeline, set their intensity and sharpness, hear a sketch of the pattern, and export an .ahap file to play with Core Haptics in your app.

Runs in your browser. Nothing you type or open is uploaded. Free to use, no account. More developer tools

How to use it

  1. Click the timeline to add a transient tap or a continuous buzz, or start from a preset.
  2. Drag events to move them and set exact values in the inspector.
  3. Press Play for a sound sketch, then copy or download the .ahap file.

AHAP files and Core Haptics

AHAP (Apple Haptic and Audio Pattern) is the JSON format Core Haptics reads with CHHapticPattern(contentsOf:). A pattern lists events by time: HapticTransient for short taps and HapticContinuous for buzzes with a duration, each with intensity and sharpness from 0 to 1, plus optional parameter curves that change intensity or sharpness over time.

The editor validates every value, keeps audio events from imported files as they are, and shows a Swift snippet that plays the file. The preview here is a sound sketch; the real feel comes from the Taptic Engine, so test the exported file on an iPhone, for example in the Haptics Explorer app.

Private by design

Privacy

Everything runs in this page and stays on your device. Your pattern is edited inside this page and saved in this browser.

This page also shows Google ads, which can use cookies. Privacy and cookies explains how.

Questions

How do I play an AHAP file in my app?

Add the .ahap file to your Xcode project, create a CHHapticEngine, start it, and call playPattern(from:) with the file's URL. The page shows the Swift code.

What is the difference between intensity and sharpness?

Intensity is how strong the vibration feels. Sharpness is its character: low values feel round and soft, high values feel crisp and precise.

Can I feel the pattern in the browser?

Browsers on iPhone cannot drive the Taptic Engine, so the page plays a sound sketch, and Android browsers can vibrate a rough version. Test the real feel on an iPhone.

Can I open an existing AHAP file?

Yes. Paste it or open the file. The page checks it and lists any problems with the event and field.

From the same developer

  • Haptics Explorer screenshot 1
  • Haptics Explorer screenshot 2
  • Haptics Explorer screenshot 3