izzyreal / vmpc-juce

JUCE implementation of VMPC2000XL
GNU General Public License v3.0
91 stars 7 forks source link

Haptic feedback iOS & macOS #93

Open izzyreal opened 1 year ago

izzyreal commented 1 year ago

Provide haptic feedback where cool: buttons, datawheel, pads. See ButtonControl, DataWheelControl and PadControl for places to trigger haptic feedback.

JUCE has no support for this as far as I can see, so we'll need to hack in some Obj-C++ .mm and C++ .h. See https://github.com/izzyreal/vmpc-juce/blob/master/src/main/gui/IosDocumentBrowser.h and https://github.com/izzyreal/vmpc-juce/blob/master/src/main/gui/IosDocumentBrowser.mm for an example.

See https://developer.apple.com/documentation/uikit/uifeedbackgenerator?language=objc for iOS and https://developer.apple.com/documentation/appkit/nshapticfeedbackmanager?language=objc for macOS native APIs.

Also keep in mind we'll need to set permissions in the plist. Not sure yet how exactly, but maybe like this: https://github.com/izzyreal/vmpc-teamcity-config/blob/d2b921a1afe7340abde42a390b4b48d394c84e83/.teamcity/settings.kts#L645