simapi

Racing Simulator Telemetry Mapping


Project maintained by Spacefreak18 Hosted on GitHub Pages — Theme by mattgraham

Bass Shakers

Bass Shakers are special sound transducers, monocoque uses game telemetry to generate sound pulses for specific events such as engine rpm, gears, and tyre slip. The shakers are setup much like normal speakrs.

The key to a great experience is to remember that less is more. Not too many shakers, and not too many events should be sent to a single shaker.

The monocoque configuration for shakers looks like this:

{
device       = "Sound";
effect       = "Engine";
devid        = "alsa_output.usb-Generic_USB2.0_Device_20170726905959-00.analog-stereo";
channels     = 2;
pan          = 0;
tyre         = "FrontLeft";
volume       = 90;
modulation   = "frequency"; // or "amplify"
frequency    = 27;
frequencyMax = 37;
amplitude    = 50;
amplitudeMax = 100;
}

Device and Channel Pan Setup

Firstly I highly recommand puleaudio tools, such as pavucontrol. I imagine this can be done with pipewire replacements, but I personally have not transitioned myself.

It is also worth mentioning that while Monocoque depends on libpulse, this does not mean it depends on Pulseaudio. It should work on Pipewire seemlessly, as libpulse will work with it as a drop in replacement.

When using sound devices it is necesarry to provide a devid in the configuration. This command should list available sound cards with the “Name” being the “devid” needed in the monocoque config.

pactl list sinks | grep -E -i 'index:|name:' -A 4

This command will also display the channel mapping for each card, which is the channel id for pan starting at 0.

One can then generate sample teset sine waves at specific frequency on a specific channel on a specific sound card with this command (change -d to the Name of your desired target card and change 440 to any frequency)

ffmpeg -f lavfi -i "sine=f=440" -af "pan=7.1|c1=c0" -f wav pipe:1 | paplay --no-remap --no-remix -d alsa_output.pci-0000_00_1b.0.analog-stereo --volume=65536 -n "Monocoque" --stream-name="Haptic Test"

(BE CAREFUL!!! AS THIS SETS THE MAXIMUM STREAM VOLUME!!! the -n and –stream-name are optional but it helps you identify the stream in pavucontrol) The channel map from the pactl command is the order of channels. The important part is “pan=7.1|c1=c0”. The first part of this is the source sound card channels (pan=7.1 is for 8 channel surround, sound pan=2C is for stereo sound.). The second part, c1=c0 directs output to the second sound channel in the sound mapping list found in the first command. c0=c0 would be the first channel in the mapping, and c4=c0 would be the fifth channel if you have one.

The effects generated by monocoque should match the effects generated by this ffmpeg command. The frequency will differ slightly due to having to fit in the buffer size (monocoque lowers the target frequency until it fits in the audio buffer).


Setting up bass shakers and getting a good experience is a bit of a black art. Here are some tips ( mostly pertaining to SimHub ) but deal with the fine tuning and would still apply.