Hi gang; Is there a way to give a shred a name so that MiniAudicle displays something more useful than "spork~exp" in the list of running shreds? It would be handy -- reassuring even -- to be able to see what shreds are running. - rdp
hey, anyone get this to work in chuck: http://www.3dconnexion.com/3dmouse/spacenavigator.php ? it appears as a hid device in Max, but i can't figure out how to connect to it in chuck. is a promising "controller." dt
On 23 May 2009, at 16:42, Daniel Trueman wrote:
hey, anyone get this to work in chuck:
http://www.3dconnexion.com/3dmouse/spacenavigator.php
?
it appears as a hid device in Max, but i can't figure out how to connect to it in chuck. is a promising "controller."
Have you checked if you see anything in the Application "Joystick and Gamepad Tester" (Mac OS X)? Hans
thanks for that; didn't know about it. but, yes, it shows up and behaves fine there... dt On May 23, 2009, at 12:02 PM, Hans Aberg wrote:
On 23 May 2009, at 16:42, Daniel Trueman wrote:
hey, anyone get this to work in chuck:
http://www.3dconnexion.com/3dmouse/spacenavigator.php
?
it appears as a hid device in Max, but i can't figure out how to connect to it in chuck. is a promising "controller."
Have you checked if you see anything in the Application "Joystick and Gamepad Tester" (Mac OS X)?
Hans
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On 23 May 2009, at 19:44, Daniel Trueman wrote:
thanks for that; didn't know about it. but, yes, it shows up and behaves fine there...
The main point is that it shows the available variables. Chuck may not support them all, so the source codes might need be tweaked and recompiled. Anyway, try open it using 0 => int deviceNum; Hid kb; if(!kb.openJoystick(deviceNum)) me.exit(); // Or .openMouse and use HidMsg msg; to read messages on the variables listed in the API in the manual. Hans
yes i had tried all that (openjoystick, openmouse, even openkeyboard) using lots of deviceNumbers (>10) and it never *finds* it at all. max finds it fine... dt On May 23, 2009, at 2:23 PM, Hans Aberg wrote:
On 23 May 2009, at 19:44, Daniel Trueman wrote:
thanks for that; didn't know about it. but, yes, it shows up and behaves fine there...
The main point is that it shows the available variables. Chuck may not support them all, so the source codes might need be tweaked and recompiled.
Anyway, try open it using 0 => int deviceNum; Hid kb; if(!kb.openJoystick(deviceNum)) me.exit(); // Or .openMouse and use HidMsg msg; to read messages on the variables listed in the API in the manual.
Hans
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On 23 May 2009, at 20:33, Daniel Trueman wrote:
yes i had tried all that (openjoystick, openmouse, even openkeyboard) using lots of deviceNumbers (>10) and it never *finds* it at all. max finds it fine...
I have looked around, and from what I can see, one needs to make some new code for it. In Chuck's source file util_hid.cpp, for joysticks, the Mac OS X HID API variable kHIDUsage_GD_Joystick is used, which is mentioned in http://developer.apple.com/technotes/tn2007/tn2187.html which describes the general HID USB interface. Then netsearching for "spacenavigator hid usb type Mac OS X" led to http://www.3dconnexion.com/forum/viewtopic.php?t=34 which says: The LED is an ordinary HID output. I am able to control it from Mac OS X using the OS-provided HID APIs. Look for an element of type 129, then set its value to 1. So it seems that it is a regular USB device, but not one in those specific classes: some other programming with that API will do, though. Just my guess. Hans
Hey Dan, Hans, I'm pretty sure there is no direct way to go from SpaceNavigator -> ChucK. In its current form, ChucK HID only deals with devices that identify themselves as keyboards, mice, or joysticks. I actually bought one of these a while back for the specific purpose of getting it to work in ChucK, so there's a definite possibility of that manifesting in some form. In the long term, I think it would be better if ChucK had a way of dealing with any kind of generic HID. spencer On May 23, 2009, at 12:58 PM, Hans Aberg wrote:
On 23 May 2009, at 20:33, Daniel Trueman wrote:
yes i had tried all that (openjoystick, openmouse, even openkeyboard) using lots of deviceNumbers (>10) and it never *finds* it at all. max finds it fine...
I have looked around, and from what I can see, one needs to make some new code for it. In Chuck's source file util_hid.cpp, for joysticks, the Mac OS X HID API variable kHIDUsage_GD_Joystick is used, which is mentioned in http://developer.apple.com/technotes/tn2007/tn2187.html which describes the general HID USB interface. Then netsearching for "spacenavigator hid usb type Mac OS X" led to http://www.3dconnexion.com/forum/viewtopic.php?t=34 which says: The LED is an ordinary HID output. I am able to control it from Mac OS X using the OS-provided HID APIs. Look for an element of type 129, then set its value to 1.
So it seems that it is a regular USB device, but not one in those specific classes: some other programming with that API will do, though. Just my guess.
Hans
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On 24 May 2009, at 02:26, Spencer Salazar wrote:
I'm pretty sure there is no direct way to go from SpaceNavigator -> ChucK. In its current form, ChucK HID only deals with devices that identify themselves as keyboards, mice, or joysticks.
There is a a file /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/ IOKit/hid/IOHIDUsageTables.h which defines HID type numbers and there controller variables kHIDUsage_GD_Pointer = 0x01, /* Physical Collection */ kHIDUsage_GD_Mouse = 0x02, /* Application Collection */ /* 0x03 Reserved */ kHIDUsage_GD_Joystick = 0x04, /* Application Collection */ kHIDUsage_GD_GamePad = 0x05, /* Application Collection */ kHIDUsage_GD_Keyboard = 0x06, /* Application Collection */ kHIDUsage_GD_Keypad = 0x07, /* Application Collection */ kHIDUsage_GD_MultiAxisController = 0x08, /* Application Collection */ Perhaps it is a multiaxis controller, then.
I actually bought one of these a while back for the specific purpose of getting it to work in ChucK, so there's a definite possibility of that manifesting in some form. In the long term, I think it would be better if ChucK had a way of dealing with any kind of generic HID.
One would want a way to list all available devices, and make a pick from them. (Like 'chuck --probe' but for HIDs and within the program.) There are though a lot of controller types. Further down in the file mentioned above: kHIDUsage_Sim_FlightSimulationDevice = 0x01, /* Application Collection */ kHIDUsage_Sim_AutomobileSimulationDevice = 0x02, /* Application Collection */ kHIDUsage_Sim_TankSimulationDevice = 0x03, /* Application Collection */ kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04, /* Application Collection */ kHIDUsage_Sim_SubmarineSimulationDevice = 0x05, /* Application Collection */ kHIDUsage_Sim_SailingSimulationDevice = 0x06, /* Application Collection */ kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07, /* Application Collection */ kHIDUsage_Sim_SportsSimulationDevice = 0x08, /* Application Collection */ kHIDUsage_Sim_AirplaneSimulationDevice = 0x09, /* Application Collection */ kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A, /* Application Collection */ kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B, /* Application Collection */ kHIDUsage_Sim_BicycleSimulationDevice = 0x0C, /* Application Collection */ /* 0x0D - 0x1F Reserved */ kHIDUsage_Sim_FlightControlStick = 0x20, /* Application Collection */ kHIDUsage_Sim_FlightStick = 0x21, /* Application Collection */ kHIDUsage_Sim_CyclicControl = 0x22, /* Physical Collection */ kHIDUsage_Sim_CyclicTrim = 0x23, /* Physical Collection */ kHIDUsage_Sim_FlightYoke = 0x24, /* Application Collection */ kHIDUsage_Sim_TrackControl = 0x25, /* Physical Collection */ ... Do you want them all? :-) Hans
On 24 May 2009, at 14:50, dan trueman wrote:
One would want a way to list all available devices, and make a pick from them. (Like 'chuck --probe' but for HIDs and within the program.)
yes, this would be super useful...
I think this is essentially what the program I mentioned in the other post does. Below is a sample printout, for a Logitech Extreme 3D, which has 12 buttons, x-, y- and z-axis, slider, and hatswitch. As you can see, it writes out a lot information about the product and all its controller elements. Hans ---- --- Device 0 --- IO Registry Path: [ IOService:/MacRISC2PE/pci@f2000000/AppleMacRiscPCI/ usb@18/AppleUSBOHCI/Logitech Extreme 3D@18100000/IOUSBInterface@0/ IOUSBHIDDriver ] - Device Properties - Transport = USB VendorID = 0x46d (1133) ProductID = 0xc215 (49685) VersionNumber = 0x204 (516) Manufacturer = Logitech Product = Logitech Extreme 3D LocationID = 0x18100000 (403701760) PrimaryUsage = 0x4 (4) PrimaryUsagePage = 0x1 (1)- Device Element Properties - Elements = [0] ElementCookie = 0x1 (1) Collection Type (513), CollectionType = 0x1 (1) Usage: Generic Desktop (0x1), Joystick (0x4) Elements = [0] ElementCookie = 0x2 (2) Collection Type (513), CollectionType = 0x2 (2) Usage: Generic Desktop (0x1), X-Axis (0x30) Elements = [0] ElementCookie = 0x4 (4) Button Input Type (2), Usage: Button Page (0x9), Button #1 (0x1) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [1] ElementCookie = 0x5 (5) Button Input Type (2), Usage: Button Page (0x9), Button #2 (0x2) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [2] ElementCookie = 0x6 (6) Button Input Type (2), Usage: Button Page (0x9), Button #3 (0x3) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [3] ElementCookie = 0x7 (7) Button Input Type (2), Usage: Button Page (0x9), Button #4 (0x4) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [4] ElementCookie = 0x8 (8) Button Input Type (2), Usage: Button Page (0x9), Button #5 (0x5) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [5] ElementCookie = 0x9 (9) Button Input Type (2), Usage: Button Page (0x9), Button #6 (0x6) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [6] ElementCookie = 0xa (10) Button Input Type (2), Usage: Button Page (0x9), Button #7 (0x7) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [7] ElementCookie = 0xb (11) Button Input Type (2), Usage: Button Page (0x9), Button #8 (0x8) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [8] ElementCookie = 0xc (12) Button Input Type (2), Usage: Button Page (0x9), Button #9 (0x9) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [9] ElementCookie = 0xd (13) Button Input Type (2), Usage: Button Page (0x9), Button #10 (0xa) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [10] ElementCookie = 0xe (14) Button Input Type (2), Usage: Button Page (0x9), Button #11 (0xb) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [11] ElementCookie = 0xf (15) Button Input Type (2), Usage: Button Page (0x9), Button #12 (0xc) Min = 0x0 (0) Max = 0x1 (1) ScaledMin = 0x0 (0) ScaledMax = 0x1 (1) Size = 0x1 (1) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [12] ElementCookie = 0x10 (16) Miscellaneous Input Type (1), Usage: Generic Desktop (0x1), X-Axis (0x30) Min = 0x0 (0) Max = 0x3ff (1023) ScaledMin = 0x0 (0) ScaledMax = 0x3ff (1023) Size = 0xa (10) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [13] ElementCookie = 0x11 (17) Miscellaneous Input Type (1), Usage: Generic Desktop (0x1), Y-Axis (0x31) Min = 0x0 (0) Max = 0x3ff (1023) ScaledMin = 0x0 (0) ScaledMax = 0x3ff (1023) Size = 0xa (10) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [14] ElementCookie = 0x12 (18) Miscellaneous Input Type (1), Usage: Generic Desktop (0x1), Hatswitch (0x39) Min = 0x0 (0) Max = 0x7 (7) ScaledMin = 0x0 (0) ScaledMax = 0x13b (315) Size = 0x4 (4) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = true Unit = 0x14 (20) UnitExponent = 0x0 (0) [15] ElementCookie = 0x13 (19) Miscellaneous Input Type (1), Usage: Generic Desktop (0x1), Z-Rotation (0x35) Min = 0x0 (0) Max = 0xff (255) ScaledMin = 0x0 (0) ScaledMax = 0xff (255) Size = 0x8 (8) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) [16] ElementCookie = 0x14 (20) Miscellaneous Input Type (1), Usage: Generic Desktop (0x1), Slider (0x36) Min = 0x0 (0) Max = 0xff (255) ScaledMin = 0x0 (0) ScaledMax = 0xff (255) Size = 0x8 (8) IsRelative = false IsWrapping = false IsNonLinear = false HasPreferredState = true HasNullState = false Unit = 0x0 (0) UnitExponent = 0x0 (0) ... ----
On 24 May 2009, at 14:50, dan trueman wrote:
One would want a way to list all available devices, and make a pick from them. (Like 'chuck --probe' but for HIDs and within the program.)
yes, this would be super useful...
I just hacked up the before mentioned program so that it does that (on Mac OS X, external to Chuck) - at least it works for the devices I hooked up. It checks the seven categories of HIDs listed in the API: pointers, mice, joysticks, gamepads, keyboards, keypads and multiaxis controllers. Do you have the Xcode developers package installed? - I can then post the sources here, with instructions. All that is needed is a compile in Terminal. Hans
This may be somewhat heretical to post here, but PD-extended has an
[hid] object that I've used in the past. If you go to the "help" for
the [hid] object, it opens a patch that lets you grab all sorts of
info about the connected devices. The controls aren't super intuitive,
but if you can figure out how to use it, it might be a good tool for
testing the spacenavigator.
andy
On Sun, May 24, 2009 at 1:11 PM, Hans Aberg
On 24 May 2009, at 14:50, dan trueman wrote:
One would want a way to list all available devices, and make a pick from them. (Like 'chuck --probe' but for HIDs and within the program.)
yes, this would be super useful...
I just hacked up the before mentioned program so that it does that (on Mac OS X, external to Chuck) - at least it works for the devices I hooked up. It checks the seven categories of HIDs listed in the API: pointers, mice, joysticks, gamepads, keyboards, keypads and multiaxis controllers.
Do you have the Xcode developers package installed? - I can then post the sources here, with instructions. All that is needed is a compile in Terminal.
Hans
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On 24 May 2009, at 02:26, Spencer Salazar wrote: > ...In the long term, I think it would be better if ChucK had a way > of dealing with any kind of generic HID. There is a sample code, though buggy, that lists the devices, and makes it easy to see what variables a HID device produces: http://developer.apple.com/samplecode/HID_Manager_Basics/ listing3.html In order to get it compiling in Xcode, I had to do the following: * Create a Carbon project. * Add the unpacked sources (just drop the whole directory into the project). * Add /System/Library/Frameworks/IOKit.framework (add from Project - > Add to Project) * Change a couple of comparisons of NULL to 0 (with mach_port_t derived types, like io_iterator_t). * To test a joystick, in the file HID_Manager_Test.c, the line following "Finding GamePads", change kHIDUsage_GD_GamePad into kHIDUsage_GD_Joystick. This way, when running it, with the Xcode Console visible, I could (using-T) get a printout of the joystick parameters. Try changing this last line into kHIDUsage_GD_MultiAxisController, and see if you get anything. Hans
participants (6)
-
Andrew Turley
-
dan trueman
-
Daniel Trueman
-
Hans Aberg
-
Robert Poor
-
Spencer Salazar