Code Examples of CMHeadphoneMotionManager in CoreMotion with OSC Forwarder
- Xcode: 15.0+
- iOS : 14.0+ or macOS Sonoma Beta+ on Mac computers with Apple silicon
- iPhone, iPad (*1)
- AirPods Pro(1st or 2nd generation) / AirPods Max / AirPods(3rd generation) or Beats Fit Pro
*1: iPod Touch (7th generation) is not supported.
*2: The necessary sensors are included, so it should work.
Open AirPodsProMotion.xcodeproj
on Xcode15 or later, then connect your iPhone or iPad to build it.
Open AirPodsProMotion.xcodeproj
on Xcode15 or later, choose My Mac (Mac Catalyst) as Run Destination and build it.
|
|Displays the information (CMDeviceMotion
) obtained from AirPodsPro and forwards the Yaw, Pitch and Roll data via OSC to the localhost on Port 9999. Set to autostart/recover the OSC stream whenever any AirPodsPro are connected or reconnected to the device.
Yoshio Tsukuda