Now possible! IOS 17 can play haptic signals and vibrations from special .AHAP (apple haptic) files straight in files app.

By Deniz Sincar, 1 October, 2023

Forum
iOS and iPadOS

Hey guys.
recently I came across some apple developer article about playing haptic vibrations from a file. It says that you can create a special json formatted file with an extension .ahap. Inside you can code your own great unique vibration patterns. This haptic format is so rich that it can vibrate in different musical notes, make louder or quieter tick tick tick signals and many more.
Yesterday I figured out that if you import an ahap file into the "files" app, e.g. your icloud drive, you can play and feal them straight ahead! The only difference is that the play button doesn't make audio sound from the speaker, but true and unique vibrations and haptics! That's awesome!

What does it mean for a normal user?

It means that you can create and share vibrations by your favorite messenger, open it up and play it instantly!
Remember the days where your iphone could just make bzzzz vibrations in the same frequency?
Than apple released iPhone 6s with taptic engine and it started to get fealing of taps...
Than apple released iPhone 7 and the ringtones became accompanied by the synched vibration so iPhone started vibrating in rhythm.
And now we came to iOS 17! Custom haptics, custom vibrations, all are here!

well, how to try it out?

I've made a small collection of ahaps on my website, hope it's legal to post. You can try them out by visiting my collection of ahaps here
After some time, i hope i'll release a pip package for python to create your own great haptics. UPD: here's my github repo with my haptic creator written in python. You can mess around with it!

Best regards.

Deniz Sincar, a blind programmer, pianist and very strange experimentator!

Options

Comments

By Andy Lane on Monday, October 23, 2023 - 09:13

I wonder what the minimum and maximum frequency allowable is. One of those files was pretty high frequency. The one that kept repeating over and over. I can’t remember the filename. I bet you could compose some really interesting tunes.

By Deniz Sincar on Monday, October 23, 2023 - 09:13

Thank you. According to a medium article, which i lost, the minimum is 80 hz and maximum is 230. Well, please show me how to reply on comments.

By SuperSilly on Monday, October 23, 2023 - 09:13

Hello thank you for letting us know this great change.
I would like to suggest you:
1. can you give more details on how to use your python script?
e.g. example of scripts
2. can you explain on how to use ahap file?
thanks you

By Deniz Sincar on Monday, October 23, 2023 - 09:13

It was in the second commit plan! Adding a good readme.md. Just now writing readme.

By SuperSilly on Monday, October 23, 2023 - 09:13

thank you, looking forward for it.

By Deniz Sincar on Monday, October 23, 2023 - 09:13

I committed and pushed my new readme.md. However it was checked and a little bit rewritten by gpt!

By Deniz Sincar on Monday, October 23, 2023 - 09:13

as i know: no. I tried but instead of playing it showed the contents of the file

By Deniz Sincar on Monday, October 23, 2023 - 09:13

Hello. Well, in theory, it's possible, but the electromagnet and the oscilating metal part is so heavy to perform the high frequencÒ„ies. Well, apple's taptic api doesn't allow high frequencies, so literally we can think about making sound with taptic engine if you pull it out from iphone and insert to some microcontroller. But a surprising fact, taptic engine can play 2 different frequency vibrations at the same time, and maybe 3 or more, but I didn't check it. Basically it can do musical chords.

By Quinton Williams on Monday, October 23, 2023 - 09:13

Wow, this is so cool! I've been wanting to learn more about this taptic engine. I do have some questions though. How difficult would it be to write a program which can convert audio files into ahap files?
Ex. import audio of speech and/or music and have it converted.

I've always wanted apple to allow us to create synchronized haptics for our own tones. If only we could import custom ringtones with accompanying haptics to show up under the synchronized section. Just a thought, but really this is really sweet. Thanks for posting.

By Quinton Williams on Monday, October 23, 2023 - 09:13

I noticed there was a midi file with an accompanying haptic version. how is this done? are there ways to create haptic representations of audiofiles directly? I'm browsing through the stuff from github now and am very intrigued.

By Deniz Sincar on Monday, October 23, 2023 - 09:13

Hello. Yes, actually, there is already a sound2ahap syncher. as for midi file, The music.py does it's job to convert midi to ahap.

By Deniz Sincar on Monday, October 23, 2023 - 09:13

Now it's not possible, but it will be soon possible I think, because, well, ios16 didn't allow to play ahap straight. The ahaps were made for bundling in the apps that use haptics.

By Exodia on Monday, October 23, 2023 - 09:13

Customizing your own vibrations is very interesting. Do you think there could be an app for creating vibrations like that? I know there is a custom setting for a vibrations and things like that, but you make it vibrate at your own frequency and all that kind of stuff is really cool. The only problem is I don’t have a laptop or a Mac to put these files into iCloud if I were to make my own and I’m also not very cold savvy.

By Deniz Sincar on Monday, October 23, 2023 - 09:13

yep, you don't need to have a mac. just send ahap file by a messenger, but whatsapp fails on big ones.

By K. Van on Thursday, November 23, 2023 - 09:13

Wouldn't it be nice, if it was possible to create haptic sheet music... a haptic XML converter... Perhaps even link it up to something like the feelspace / navibelt...

By Ricardo Brandão on Thursday, November 23, 2023 - 09:13

That's, simply, amazing!!! 😎😰