As a small offering of appreciation for those who contribute to this community,
attached is a SimHub ShakeIt bass shaker profile
that provides tactile sensations below frequencies
for which Dayton exciters and pucks deliver useful energy.
It operates on the same principle as AM radio,
namely modulating a higher (carrier) frequency
by a lower frequency signal. In this profile,
that signal is based on vehicle speed,
but that could be replaced by any other suitably scaled telemetry.
Since SimHub maximum refresh rate is 60Hz,
the highest modulating frequency possible is 30Hz,
which wants a "carrier" frequency greater than 60 Hz.
attached is a SimHub ShakeIt bass shaker profile
that provides tactile sensations below frequencies
for which Dayton exciters and pucks deliver useful energy.
It operates on the same principle as AM radio,
namely modulating a higher (carrier) frequency
by a lower frequency signal. In this profile,
that signal is based on vehicle speed,
but that could be replaced by any other suitably scaled telemetry.
Since SimHub maximum refresh rate is 60Hz,
the highest modulating frequency possible is 30Hz,
which wants a "carrier" frequency greater than 60 Hz.
JavaScript:
if (null == root['phase']) { // initialize
root['phase'] = 0;
root['inc'] = 1;
}
// Applying logarithm to telemetry helps spread values over frequencies
// avoid dividing by < 1 and log of values < 1
var a = Math.max(1,10 - 1.7 * Math.log(Math.max(1,$prop('SpeedLocal'))));
//return a
// generate sawtooth approximation to sine
if (a <= root['phase']) {
root['phase'] = a;
root['inc'] = -1;
}
else if (0 >= root['phase'])
root['inc'] = 1;
root['phase']+=root['inc'];
return (80 / a) * root['phase'];
Attachments
Last edited: