Welcome to %s forums

BrainModular Users Forum

Login Register

anyone using joysticks with usine?

General Discussion about whatever fits..
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 16 Jun 2017, 23:49

So..Im really happy i could tweak a hid 3d mouse "space navigator" so it could be seen in usine as a joystick and get the usable motion datas.
it's a 6 degrees device: Translation X, Y, Z, and Rotation X, Y , Z.

I do see all datas moving on the joystick module, spread to the 6 axis, except for one wich is supposed to be the " HIDJoystick_Ry"
supposed to be on axis-5 on the module.

maybe it's an error from my side, or someting to tweak in windows, just wanted to know if somebody already used this 'axis-5' and check its not coming from usine.

gurulogic
Member
Posts: 1019
Contact:

Unread post by gurulogic » 17 Jun 2017, 00:40

I'm not but it sounds like an awesome idea!

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 17 Jun 2017, 01:10

yes there are cool things to do i think :)

it was much easier than i thought, i was about to dive in hard stuff like attempting to make a module with their sdk, then i just discovered by just editing an xml can convert the HID datas to virtual joystick datas, and then usine is able to read them out of the box via the joystick module.
just a quick test of Z axis for pressure:

https://drive.google.com/open?id=0B0VUy ... zF2RzRxY2c


User avatar
oli_lab
Member
Posts: 1263
Location: Brittany, France
Contact:

Unread post by oli_lab » 17 Jun 2017, 09:32

23fx23 wrote:yes there are cool things to do i think :)

...by just editing an xml can convert the HID datas to virtual joystick datas, and then usine is able to read them out of the box via the joystick module.

https://drive.google.com/open?id=0B0VUy ... zF2RzRxY2c
that is very intersting indeed !

would you share the hack ?

cheers !
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 17 Jun 2017, 11:24

yes, but think i havn't been very clear sry, note it's specific to 3dconnexion mices devices, because their driver kinda make a virtual keyboard/mouse/joystick new hid device , and a per app xml hidden that watch when an .exe is launched and creates some binds between their hid and the virtual driver. in it's not a trick working for all HID devices sadly..

but in case some go for those kind of mice, the xml are located in
C:UsersUserNameAppDataRoaming3Dconnexion3DxWareCfg

and mine for usine looks like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<AppCfg Default="false" xmlns="" CfgFormatVersion="1.2" ThisFileVersion="1.4">
  <AppInfo>
    <Signature>
      <Name>Usine.exe</Name>
      <ExecutableName>Usine.exe</ExecutableName>
      <Transport>KMJ</Transport>
    </Signature>
    <Options />
  </AppInfo>
  <CfgProperties>
    <InheritsFrom>STR_DEFAULT_KMJ</InheritsFrom>
  </CfgProperties>
  <Settings>
    <OverallScale>0.34</OverallScale>
    <ResponseCurve>1.00</ResponseCurve>
  </Settings>
  <Devices>
    <Device>
      <Name>Standard 3D Mouse</Name>
      <VendorID>0</VendorID>
      <ProductID>0</ProductID>
      <InheritsFrom>Standard 3D Mouse</InheritsFrom>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_X</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_X</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Y</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Y</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Z</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Z</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rx</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Rx</ActionID>
          <Reversed>false</Reversed>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Ry</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Ry</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rz</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Rz</ActionID>
        </Output>
      </Axis>
    </Device>
    <Device>
      <Name>SpaceNavigator</Name>
      <VendorID>46d</VendorID>
      <ProductID>c626</ProductID>
      <InheritsFrom>Standard 3D Mouse</InheritsFrom>
      <ButtonBank Default="true">
        <Name>STR_DEFAULT_BUTTONBANK</Name>
        <ID>Default</ID>
        <Button>
          <Input>
            <ActionID>HIDButton_1</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_1</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>HIDButton_2</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_2</ActionID>
          </Output>
        </Button>
      </ButtonBank>
    </Device>
  </Devices>
</AppCfg>

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 17 Jun 2017, 20:08

Yeah I just picked up a joystick as well and was looking into doing this sometime in the near future too.
Very awesome, thanks!

-s
"Every act of creation is first an act of destruction." -Picasso

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests