-1

I'm trying to play a custom haptic pattern from a .wav file. The apple docs specify that:

AHAP files are JSON-compliant dictionary representations of haptic and audio patterns that you can compose in a text editor, or any program that exports content in the JSON format.

I'm wondering how to generate that JSON file from the original audio file?

Ahmed Abaza
  • 89
  • 1
  • 7

1 Answers1

0

There is no magical mapping between a WAV file and a haptic pattern. You'll just have to use your ears and your brain. Listen to the WAV file and write the haptic pattern in such a way as to imitate it.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • There isn't even a way to convert an CHHapticPattern.Key based dictionary to an AHAP json file. – matt Jun 13 '22 at 12:10