Systems and methods for arbitrary haptic waveform generation
A method of providing haptic feedback to a user includes, at an electronic device controller, determining a dynamic resonant frequency of a haptic device; receiving haptic information at an electronic device controller, mapping the haptic information to a resonant waveform with the dynamic resonant frequency; outputting a haptic waveform; and driving the haptic device according to the haptic waveform.
1 . A method of providing haptic feedback to a user, the method comprising:
at an electronic device controller:
determining a dynamic resonant frequency of a haptic device; receiving haptic information at the electronic device controller, the haptic information specifying a requested frequency that is relatively lower than the dynamic resonant frequency of the haptic device;
mapping the haptic information to the dynamic resonant frequency, the mapping resulting in a haptic waveform that approximates the relatively lower requested frequency by varying amplitudes of the haptic waveform over time at the relatively lower requested frequency while driving the haptic device at the dynamic resonant frequency;
outputting the haptic waveform; and
driving the haptic device according to the haptic waveform, the driving causing the haptic device to resonate at the dynamic resonant frequency while changing amplitude over time based on the haptic waveform.
2 . The method of claim 1 , wherein mapping the haptic information includes setting a time step for amplitude changes based on the dynamic resonant frequency.
3 . The method of claim 2 , wherein mapping the haptic information includes downsampling a high sample-rate haptic waveform based at least partially on the time step.
4 . The method of claim 1 , wherein the haptic information is received in a game input protocol command.
5 . The method of claim 1 , wherein the haptic information is determined from audio information received at the electronic device controller.
6 . The method of claim 1 , further comprising transmitting the dynamic resonant frequency to an electronic device, and wherein the haptic information is received from the electronic device.
7 . The method of claim 1 , wherein the dynamic resonant frequency is determined upon startup of the electronic device controller.
8 . The method of claim 1 , wherein the dynamic resonant frequency is determined at preset time intervals.
9 . The method of claim 1 , wherein the dynamic resonant frequency is determined upon receiving haptic information.
10 . The method of claim 1 , further comprising:
determining a time step based at least on the dynamic resonant frequency of the haptic device;
providing an application programming interface to a software application; receiving the haptic information from the software application via the application programming interface; and
mapping the haptic information received via the application programming interface to the dynamic resonant frequency based at least on the determined time step.
11 . The method of claim 1 , wherein the amplitudes are varied by generating varying electromagnetic impulses while maintaining a consistent restoring force of the haptic device.
12 . An electronic device controller comprising: a body;
at least one input button; a processor;
a communication device in communication with the processor; a haptics controller in communication with the processor;
a linear haptic device in communication with the haptics controller; and
a hardware storage device in communication with the processor or the haptics controller having instructions stored thereon that, when executed by the processor or the haptics controller, cause the electronic device controller to:
determine a dynamic resonant frequency of the linear haptic device, receive haptic information, the haptic information specifying a requested frequency that is relatively lower than the dynamic resonant frequency of the haptic device,
perform mapping of the haptic information to the dynamic resonant frequency, the mapping resulting in a haptic waveform that approximates the relatively lower requested frequency by varying amplitudes of the haptic waveform over time at the relatively lower requested frequency while driving the haptic device at the dynamic resonant frequency, and
drive the linear haptic device according to the haptic waveform, the driving causing the haptic device to resonate at the dynamic resonant frequency while changing amplitude over time based on the haptic waveform.
13 . The electronic device controller of claim 12 , further comprising an eccentric rotating mass (ERM) haptic device, and wherein the instructions further cause the electronic device controller to:
select at least one of the linear haptic device or the ERM haptic device as a selected haptic device based at least partially on the haptic information, and
drive the selected haptic device according to the haptic waveform.
14 . The electronic device controller of claim 13 , wherein the selected haptic device is selected at least partially based on a duration of the haptic information.
15 . The electronic device controller of claim 13 , wherein the selected haptic device is selected at least partially based on a frequency of the haptic information.
16 . The electronic device controller of claim 13 , wherein the selected haptic device is selected at least partially based on conserving power during haptic feedback.
17 . The electronic device controller of claim 12 , wherein receiving the haptic information includes:
receiving software audio information, and
calculating the haptic information from the software audio information.
18 . The electronic device controller of claim 17 , wherein the haptic information is linear haptic information and calculating the linear haptic information is based at least partially on legacy haptic information.
19 . A method of providing haptic feedback to a user, the method comprising:
at an electronic device:
receiving a dynamic resonant frequency of a haptic device of an electronic device controller;
obtaining haptic information, the haptic information specifying a requested frequency that is relatively lower than the dynamic resonant frequency of the haptic device;
mapping the haptic information to the dynamic resonant frequency, the mapping resulting in a haptic waveform that approximates the relatively lower requested frequency by varying amplitudes of the haptic waveform over time at the relatively lower requested frequency while driving the haptic device at the dynamic resonant frequency; and
instructing the electronic device controller to drive the haptic device by varying amplitudes over time according to the haptic waveform.
20 . The method of claim 19 , wherein the haptic waveform is based at least partially on a time step according to the dynamic resonant frequency.