back

SimHub ShakeIt Bass Shaker profiles

  • Introduction
  • Profiles
  • Formulae
  • property portability
  • telemetry proxies

    Introduction

    Bass Shaker effects are output as audio signals, contrasted to rumble motors via Arduino.
    As of 25 Sep 2021, my SimHub had 28 Any Game, 1 RaceRoom and 2 Assetto Corsa profiles.
    This does not mean that 28 profiles work well with any game supported by SimHub;
    merely that 1 depends on a property unique to RR and 2 use AC-unique properties.
    That profile count was expected to drop while documenting,
    with duplicates pruned and others consolidated,
    since these employ less than 2 dozen usefully unique effects.
    (14 Mar 2024:  now ShakeIt 52 profiles;  so much for intentions)

    A SimHub effect may generate haptic outputs, custom properties or both.
    Custom haptic effects typically depend on two or more properties,
    each of which may involve 4 formulae, one for each wheel.
    Typically, JavaScript for only one formula (corner) of a custom property will be documented,
    with the other 3 hopefully obvious by symmetry.
    Several different formulae may share the same custom property name,
    exploiting different SimHub properties available in various versions for various games.
    Among the many profiles are often multiple variations on the same formula,
    some of which should be reduced to a single best version by the completion of this document,
    but others address different tranducers, sims, tracks, cars, driving styles and preferences.

    My main interest in haptic effects is for driving aids,
    in other words, more warnings before control is lost.
    My haptic transducers are small and generally dedicated to single effects.
    For example, 4 wheel loaded wheel slips feed 4 Dayton pucks in a seat cushion.


    Others may wish to repurpose and mix effects for more elaborate configurations,
    which would likely want substantially different (e.g. frequency) settings.

    Profiles

    Many of these are based on obsolete SimHub versions which lack many current properties.
    For example, ProxyS effects should disappear.

    Default profile 17 effects (then, 22 as of 14 Mar 2024)
    ShakeIt plugin as initially received; only RPM was IMO interesting as provided.
    That feeds a small shaker attached to dead pedal (foot rest left of clutch).

    AC1 2 effects
    prune of provided Default, leaving only WHEELS SLIPS and RPMS

    AC-specific (un)Loaded 4-Wheel Slips with Speed Curving (no longer available)
    Uses some proprietary Assetto Corsa properties
    ACproxyL,
    ACproxyS,
    loaded wheel slips haptic effect,
    trailing oversteer haptic effect,
    generic SPEED WITH CURVING exports SpeedCurv property to custom serial PWM fan.

    Brake Runout, Road Noise 2 output effects for mixing to a single haptic channel
    While real ABS helps, SimHub's effect activates IMO too late to aid a braking.
    Instead, a first effect simulates some rotor runout for light braking,
    progressing to a second, road noise effect for moderate pressure.
    In real life, brake pedal feel becomes dead when wheels lock.
    High pressures reduces foot sensitivity to moderate haptics, and
    generating powerfule haptic stimulae can overheat transducers; ask me how I know.
    Current implemention is binary (thresholded Brake property);
    should probably be proportional (piece-wise linear).

    Assetto Corsa - Loaded_WheelSlip9.1.20 discussed here
    SimHub 9.1.20 added Forced Frequencies to CUSTOM EFFECT, and AC has GameRawData.Physics.WheelLoad0x telemetry properties,
    allowing this a simple low overhead profile for loaded wheel slip simulating tire squeal
    to shudder based on increasing slip, with amplitude based on tire load (no load = no tactile)

    SimHub ShakeIt Bass Shakers custom 4 corner tire slip
    updated to Forced Frequencies AKA GmodulatedWheelSlip.siprofile.txt and the orginal, as described here.

    sierses_4-channel_wheelslip.siprofile
    - updated to: Forced Frequency squeal-shudder
    • based on NewLoaded4-chanWheelslipUndersteer.siprofile
    • wrapped effects in an embedded GroupContainer
      • custom effects for property AbsAcc from abs AccelerationSway, Surge
      • custom effects for property proxyL, based on Abs.Acc
      • proxyS properties exported from Wheels Slip effect
      • custom effect generates proxyL * proxyS / 100
      • custom effect for under, oversteer properties (and outputs) from proxyS front-rear differences * AbsAcc
      • custom effect generates mixes of oversteer and loaded slips

    NewLoaded4-chanWheelslipUndersteer.siprofile
    from RRRELoaded4-chanWheelslipUndersteer
    same effects as above
    • 14 Aug 2021 accelerations applied to slip differences for under/oversteer
      were all wrong
    • to do: replace AbsAcc custom effect with G-Forces effects

    Aug14Loaded4-chanWheelslipUndersteer 6 effects
    also derived from RangeyRover mix slips and oversteer disabled, output LoadedSlip

    Aug19Loaded4-chanWheelslipUndersteer groups 3 telemetery effects + 2 outputs
    non-output telemetery effects group: output effects:  Loaded WheelSlip,   gated under/oversteer

    gated speed/rpm shift 2 effects
    iirH high pass filter applied to speed/rpm.
    Gated by SimHub GEAR SHIFT effect property to mitigate false haptics e.g. from wheel slip.
    SimHub GEAR SHIFT fails to pulse for some shifts...

    joystick telemetry 2 effects
    output based on SideWinder slider when button 7 is pressed
    ROAD IMPACTS (curiosity?)

    dMASS tweaked wheelslip   3 Feb 2024
    Loaded Slip group, tweaked for Automobilista 2
    • CUSTOM EFFECT AbsAcc - used in CUSTOM EFFECT proxyL
    • CUSTOM EFFECT proxyL - simulates load on each wheel
    • WHEELS SLIP ProxyS - conditions wheelslip to control tire squeal
    • WHEELS SLIP gate - mutes tire squeal for small slippages
    • CUSTOM EFFECT noisy: frequencies
      - for output loaded wheel slips Forced Frequencies.
      Applies noise and minimum frequency to ProxyS.
      Formulae could move to output loaded wheel slips Forced Frequencies,
        if no need to tweak Gamma or Minimum Force
    • CUSTOM EFFECT output loaded wheel slips:
      - gate * proxyL modulates amplitude;
      - noisy modulates tire squeal->shudder frequency.
    Adjustments All but the last are properties, which are constrained by SimHub to be >= 0 and <= 100
    • CUSTOM EFFECT AbsAcc Gamma Factor controls load transfers among wheels
    • CUSTOM EFFECT proxyL Gamma Factor, Input Gain control how soon max amplitude occurs
    • WHEELS SLIP ProxyS Threshold, Input Gain
      control how much slip to ignore and how much gain to apply to slip telemetry
    • WHEELS SLIP gate Gamma Factor, Threshold, Input Gain
      mutes high frequency haptic below Threshold
    • CUSTOM EFFECT noisy: frequencies Gamma Factor, Minimum Force
      NCalc formulae may need tweaking; Minimum Force controls minimum haptic frequency.
      Lower Gamma reduces frequencies for more slip and haptic sensing.
    • CUSTOM EFFECT output loaded wheel slips generates haptic signals;
      • ShakeITBSV3Plugin.Export.noisy.* are constrained 0 to 100 by SimHub
      • 9*[ShakeITBSV3Plugin.Export.noisy.*]
        thus constrains Forced Frequencies between 9*noisy Minimum Force and 900(Hz)

    Loaded Slip/Grip   14 Mar 2024
    Discussion
    Earlier profiles used GlobalAccelerationG, which turns out to be only surge.
    This profile generates CUSTOM effect with 2D horizontal acceleration,
    to better complement 2D wslip.
    • CUSTOM EFFECT HaccelMin and Max/10 for output Forced Frequencies
      Haccel is proxy for Grip
    • WHEELS SLIP exports wslip - wheelslip conditioned for slip/grip
    • CUSTOM EFFECT slip/grip
      • estimates wheel loads from heave, sway and surge
      • applies wheel loads to Haccel as grip proxy
      • forces some minimum grip to avoid divide by zero when no horizontal acceleration
      • divides wslip by this grip proxy
    • CUSTOM EFFECT AC slip/grip
      • employs Assetto Corsa-specific GameRawData.Physics.WheelLoad instead of estimating
    • CUSTOM EFFECT output:  loaded wheel slips haptic signals:
      • proxyL() wheel load calculations are now integrated here
      • SlipGate() mutes output for low slip
         
            estimated wheel load examples on figure 8 track

      • Forced Frequencies apply noisy() to slip/grip
        rescaled by low and high
        to frequency modulate tire squeal->moan->judder.
    Adjustments Haccel, wslip and slip/grip are properties, constrained by SimHub to be >= 0 and <= 100
    • Haccel Rear left and right set output Min and Max/10 Force Frequencies
    • WHEELS SLIP wslip:  perhaps tweak Threshold, Gamma, Input Gain
      to change how much slip to ignore and avoid clipping at 100
    • CUSTOM EFFECT slip/grip:  reduce input gain to avoid clipping @ 100;
      increase gamma to increase average haptic activity
    • CUSTOM EFFECT output:  increase Threshold to mute weak slip

    Loaded Slip/G   9 Feb 2024     link for tire haptics discussion
    Loaded Slip group, tested with AC and Automobilista 2 replays
    • ProxyS - conditions wheelslip for ProxySG
    • CUSTOM EFFECT noisy
      • SG(): converts ProxyS to slip/grip ratio, instead of slip
      • function SG(s,g) { return 100-Math.min(100,Math.abs(.5*s/Math.max(.1,Math.abs(g)))) };
        - for output gate and noisy noise()
      • noise(): converts SG() output to frequency control range 0 to 100
      • function noise(sg) { return f * (sg + Math.random() * (1 + sg / n)) };
    • CUSTOM EFFECT output loaded wheel slips haptic signals:
      - proxyL wheel load calculations are now integrated here
      - gate(SG) * proxyL modulates amplitude:
       
          estimated wheel load examples on figure 8 track

      - noisy(slip/grip), rescaled by Min and 10 *Max/10, frequency modulates tire squeal->moan->judder.
    Adjustments ProxyS and noisy are properties, constrained by SimHub to be >= 0 and <= 100
    • WHEELS SLIP ProxyS:  perhaps tweak Threshold, Input Gain
      control how much slip to ignore and how much to boost slip telemetry
    • CUSTOM EFFECT noisy:  perhaps tweak Gamma, Input Gain
      alter tire haptic transitions from squeal to moan to judder
    • CUSTOM EFFECT output Forced Frequencies
      - low is low frequency limit
      - high is high frequency limit
        In this example, low frequency limit is 25Hz and upper frequency limit is 1000Hz:
       

    Loaded4-chanWheelSlipsUndersteer 7 effects
    (unused) proxy_G from Yaw, Speed,
    proxyG from AccelerationSurge, AccelerationSway,
    proxyL from proxyG,
    proxyS from WHEELS SLIP effect,
    Loaded WheelSlip,
    unloaded under, oversteer from proxyG and proxyS,
    (unused)mix slips and oversteer

    Loaded4-chanWheelslipUndersteer 7 effects
    unused proxy_G from OrientationYaw and SpeedKmh,
    AbsAcc from AccelerationSway and AccelerationSurge,
    proxyL from AccelerationSway, AccelerationSurge and AbsAcc,
    proxyS from WHEELS SLIP,
    LoadedWheelSlip from proxyL and proxyS,
    UnderOversteer from proxyS and AbsAcc,
    mix slips and oversteer from UnderOversteer, proxyS and LoadedSlip

    (un)Loaded 4-Wheel Slips 4 effects
    AC_proxy_G,
    AC proxyS,
    Loaded slips by combined(proxyL and Loaded WheelSlip),
    Unloaded WheelSlip (trailing oversteer) from proxy_G

    portable Loaded 4-Wheel Slips group 1 group w/7 effects
    proxyG from AccelerationSurge, AccelerationSway,
    proxyS from WHEELS SLIP effect,
    proxyL from proxyG or GameRawData.Physics.WheelLoad,
    proxyLS Loaded WheelSlip,
    Unloaded rear WheelSlip (trailing oversteer),
    Loaded over, understeer from proxyLS,
    haptic output based on speed changes during shifts and clutch releases

    RPM-modulated up/downshifts 3 effects
    by request

    RRRELoaded4-chanWheelslipUndersteer 6 effects
    from RangeyRover

    speed shifts
    Tactile effect for shifts should IMO reflect shift smoothness,
    which presumably corresponds in speed changes during those shifts.
    click for details This effect currently explores three formulae, each gated by gear changes and clutch releases:
    • high-pass filtering of changes in speed
    • surge acceleration
    • surge acceleration and high-pass filtering of same (jerk)

    Front left = Gear; Front right = surge acceleration; Rear left = high pass filter of speed changes;
    Rear right = surge acceleration + high pass filter of acceleration changes


    Since Rear left is nearly a recalculation of Front right, results differ surprisingly..
    As a reminder, to derive acceleration from speed samples, one typically
    subtracts the previous speed value from the current value,
    then optionally low-pass filters those differences,
    instead of subtracting low-pass filtered previous samples from current samples.
    However, rough shifts interest is more for sudden changes than long-term accuracy.
    Minimizing errors between methods involves tedious juggling of gains and filtering factors.
    Here are two plots evaluating methods, gated neither by gear changes nor clutch releases:
    • Front left is SpeedKmh
    • Front right is AccelerationSurge property
    • Rear left is current speed minus low-pass filtered previous speeds
    • Rear right is high-pass filtered accelerations

    This next plot is when braking with front tire lockup, a limit condition:

    The low pass time constant determined to roughly minimize
    differences between Front right and Rear left was then also applied to Rear right.

    Schnirbus tweaked slip
    Experimental 4-corner Wheelslip for iRacing group (4 effects, 1 output),
    • wslip from WHEELS SLIP
    • sideways from SPEED WITH CURVING only generate in turns
    • long shift from GameRawData.Telemetry.LongAccel
    • 4-Corner Slip output from wslip, sideways and long shift
  • maintained by blekenbleu