Discussion Tactile tranducers, virtual tees?

Greeting! I'm coming back to ED after a long break. I was playing on Linux, but for whatever reason Proton just stopped working for me one day. Regardless, that and the fact I can't run voice attack on Linux has inspired me to build a new setup!

Lots of toys coming, but among them are tactile transducers (Bass shakers) and a Bluetooth connected amp to drive them.
The current plan is to use Python to parse the journal and drive them. Entering and exiting hyperspace etc.

My question: does anyone have experience doing similar? If so can you recommend any libs for driving them? Any suggested events in the journal? Any feedback at all is welcome :)
I can't currently play, new rig coming in a couple of days.

I really wish we had access to telemetry, like speed etc. Being able to trigger them at full throttle would be awesome. I have been playing with the idea of a virtual software device that could be an intermediary between my HOTAS and the OS. Connect the HOTAS to this software, this could then trigger events to drive the transducers. Then have ED connect to the virtual device thinking it is the actual throttle. Not sure if I explained that clearly, or how difficult that would be. I haven't done any programming in a Windows environment in quite some time, but it seems possible...
It would be amazing if something like this already existed, not keen on reinventing the wheel. Anyway, thanks for reading and cheers!
 
Greeting! I'm coming back to ED after a long break. I was playing on Linux, but for whatever reason Proton just stopped working for me one day. Regardless, that and the fact I can't run voice attack on Linux has inspired me to build a new setup!

Lots of toys coming, but among them are tactile transducers (Bass shakers) and a Bluetooth connected amp to drive them.
The current plan is to use Python to parse the journal and drive them. Entering and exiting hyperspace etc.

My question: does anyone have experience doing similar? If so can you recommend any libs for driving them? Any suggested events in the journal? Any feedback at all is welcome :)
I can't currently play, new rig coming in a couple of days.

I really wish we had access to telemetry, like speed etc. Being able to trigger them at full throttle would be awesome. I have been playing with the idea of a virtual software device that could be an intermediary between my HOTAS and the OS. Connect the HOTAS to this software, this could then trigger events to drive the transducers. Then have ED connect to the virtual device thinking it is the actual throttle. Not sure if I explained that clearly, or how difficult that would be. I haven't done any programming in a Windows environment in quite some time, but it seems possible...
It would be amazing if something like this already existed, not keen on reinventing the wheel. Anyway, thanks for reading and cheers!
Oh, I can actually just listen in on the HOTAS with Python (pygame) and still connect it directly to the game, no middleman needed. That makes things a lot easier.
 
Sorry for spamming, but this is cool, picked up my thrustmaster throttle without modification. I love chatGPT for one offs like this. 😁
Although, if it would have taken longer I would still be occupied lmao.

Python:
import pygame
import time

# Initialize pygame for joystick handling
pygame.init()

# Define partial names for the target joysticks
TARGET_JOYSTICKS = {
    "thrustmaster": "Thrustmaster Throttle",
    "logitech": "Logitech Extreme 3D Pro"
}

# Initialize joystick dictionary
joysticks = {}

# Find joysticks dynamically based on partial names
for i in range(pygame.joystick.get_count()):
    joystick = pygame.joystick.Joystick(i)
    joystick.init()
    joystick_name = joystick.get_name().lower()
    if "thrustmaster" in joystick_name:
        joysticks["thrustmaster"] = joystick
        print(f"Connected to target joystick: {joystick.get_name()} (ID: {i})")
    elif "logitech" in joystick_name:
        joysticks["logitech"] = joystick
        print(f"Connected to target joystick: {joystick.get_name()} (ID: {i})")

# Check if both joysticks were found
if "thrustmaster" not in joysticks:
    print("Thrustmaster Throttle not found!")
if "logitech" not in joysticks:
    print("Logitech Extreme 3D Pro not found!")

if not joysticks:
    print("No target joysticks found!")
    pygame.quit()
    exit()

# File to log controller data
log_file = "controller_log.txt"

def log_all_joysticks_state():
    # Overwrite the file with the current state for all joysticks
    with open(log_file, "w") as file:
        for name, joystick in joysticks.items():
            device_name = TARGET_JOYSTICKS[name]
            # Get axis values
            axes = [joystick.get_axis(i) for i in range(3)]  # Log 3 axes
            # Get pressed buttons
            num_buttons = joystick.get_numbuttons()
            pressed_buttons = {f"Button {i}": 1 for i in range(num_buttons) if joystick.get_button(i) == 1}

            # Write joystick data to the log file
            file.write(f"{device_name}: Timestamp: {time.time()}\n")
            for j, axis in enumerate(axes, start=1):
                file.write(f"{device_name}: Axis {j}: {axis:.2f}\n")
            if pressed_buttons:
                file.write(f"{device_name}: Buttons: {pressed_buttons}\n")
            else:
                file.write(f"{device_name}: Buttons: None\n")
            file.write("-" * 30 + "\n")

    # Also print to console
    for name, joystick in joysticks.items():
        device_name = TARGET_JOYSTICKS[name]
        axes = [joystick.get_axis(i) for i in range(3)]
        num_buttons = joystick.get_numbuttons()
        pressed_buttons = {f"Button {i}": 1 for i in range(num_buttons) if joystick.get_button(i) == 1}

        print(f"{device_name}: Timestamp: {time.time()}")
        for j, axis in enumerate(axes, start=1):
            print(f"{device_name}: Axis {j}: {axis:.2f}")
        if pressed_buttons:
            print(f"{device_name}: Buttons: {pressed_buttons}")
        else:
            print(f"{device_name}: Buttons: None")
        print("-" * 30)

print("Monitoring joystick inputs... Press CTRL+C to stop.")
try:
    while True:
        pygame.event.pump()
        log_all_joysticks_state()
        time.sleep(0.5)

except KeyboardInterrupt:
    print("\nExiting...")
finally:
    pygame.quit()



------------------------------
Thrustmaster Throttle: Timestamp: 1732340767.2627056
Thrustmaster Throttle: Axis 1: 0.00
Thrustmaster Throttle: Axis 2: 0.00
Thrustmaster Throttle: Axis 3: 0.12
Thrustmaster Throttle: Buttons: {'Button 12': 1, 'Button 16': 1}
------------------------------
Logitech Extreme 3D Pro: Timestamp: 1732340767.2627988
Logitech Extreme 3D Pro: Axis 1: -0.00
Logitech Extreme 3D Pro: Axis 2: -0.03
Logitech Extreme 3D Pro: Axis 3: 0.01
Logitech Extreme 3D Pro: Buttons: None
------------------------------
 
Last edited:
Back
Top Bottom