Skip to content

Releases: TheNathannator/PlasticBand-Unity

v0.5.0: Variant Devices and More Fixes!

07 Jan 04:10
7c02c9f
Compare
Choose a tag to compare

Added

  • A new system has been put into place to effectively allow the layout assigned to a device to be changed at runtime. This system gives some much-needed flexibility for certain future device types, and avoids the need for hacks like manually retrieving the current state for XInput drumkits to distinguish between 4-lane and 5-lane drumkits, which proved to be unreliable.
    • NOTE: This system is incompatible with InputSystem.onEvent and InputControlExtensions.EnumerateControls/EnumerateChangedControls! It involves forwarding state events from one InputDevice to another, so the device ID present in the InputEventPtr will not match the device instance the state is ultimately used for. Use InputState.onChange or IInputStateChangeMonitors instead.

Fixed

  • The XInput GuitarBass subtype was being matched to the Guitar Hero guitar layout instead of the Rock Band guitar layout.
  • Guitar Praise guitars weren't being recognized correctly, since they use the joystick HID usage and not the gamepad usage.
    • The joystick usage is now matched against on all HID device layouts, so this won't affect any other layouts in the future.
  • Distinguishing between 4-lane and 5-lane XInput drumkits should be much more reliable now due to the new variant device system.

Removed

  • The GetFretMaskExcludingSolo method on RockBandGuitars has been removed, as not all Rock Band guitars report the solo frets independently from the main frets, which could make the results from the API confusing. If this behavior is required, GetFretMask() & ~GetSoloFretMask() will attain the same results.

v0.4.6: Santroller HID Haptics Fixed!

05 Jan 23:07
c0a7ec3
Compare
Choose a tag to compare

Added

  • A new PLASTICBAND_VERBOSE_LOGGING compile define has been added to enable certain, potentially repetitive logging in game builds. This define is not required inside the editor, as the logging is always enabled there.
    • Currently the only logging this enables is for device command errors.

Fixed

  • Santroller HID haptics were not using the correct report ID, and wouldn't send as a result. Other fixes in the Santroller firmware made alongside this change now mean that HID haptics are properly functioning finally!

v0.4.5: The Holy Guitar, Santroller haptics fix

05 Jan 04:12
7e498a2
Compare
Choose a tag to compare

Added

  • The Guitar Praise guitar is now supported. This is the first guitar to be neither a GuitarHeroGuitar nor a RockBandGuitar, it is simply a FiveFretGuitar.

Fixed

  • Fixed the SetMultiplier method on ISantrollerHaptics using the wrong command ID when sending the command to the device.

v0.4.4: PS4 Rock Band Guitar Fix

22 Dec 02:46
e291304
Compare
Choose a tag to compare

Small hotfix for an issue that got reported today.

Fixed

  • PS4 Rock Band guitars were not registering whammy/tilt/the pickup switch correctly due to an off-by-one error in the layout.

v0.4.3: Another hotfix!

06 Dec 04:05
b8fe9bf
Compare
Choose a tag to compare

Hopefully the last patch version for v0.4 lol

A couple issues slipped past still, and another couple older issues were discovered and fixed.

Fixed

  • The 4-lane drumkit layouts now ensure they report a non-zero velocity for all pad/cymbal hits.
    • The 5-lane drumkit layouts don't make the same guarantee currently, as whether or not velocity is present is used to differentiate between pads/cymbals and face buttons.
  • Santroller stage kit layouts are now registered correctly.
  • Santroller XInput 6-fret guitars are also now registered correctly, they were incorrectly being registered as regular XInput 6-fret guitars.

v0.4.2: Unit Tested, Panda Approved

15 Nov 10:20
26f7259
Compare
Choose a tag to compare

The last couple releases didn't go so well, did they? lol

After drums got entirely broken in YARG for the previous couple versions, and my fixes in v0.4.1 didn't do anything to help, I decided to set up a suite of unit tests for the package so I didn't have to scrutinize every last line of code by hand.
A lot of issues were found and fixed this way, and any future issues of this caliber should be caught up-front, rather than having to wait for battle-testing to reveal them for me.

This doesn't mean issues like this can't happen in the future, though. Ironically, the unit tests determined everything to be fine with drums, and some actual debugging revealed it was an issue with the core state translation code.
After fixing that, I also noticed that some of the velocity values on Xbox 360 4-lane drumkit were inverted, which my tests didn't catch since they hook into the same interfaces the state translation does. Just means I need to be vigilant to make sure the definitions are correct lol

Fixed

  • The velocity values on PS3/Wii 4-lane drumkits are no longer inverted.
  • Pro Guitars no longer forget to assign their digital pedal control.
  • 6-fret guitars were using the entirely wrong state layout lol, copy-paste error I missed during review.
  • Fixed turntables failing to initialize due to sbytes not being considered integers by InputState.IsIntegerFormat for some reason.
  • Fixed turntable platter buttons and Pro Guitar digital pedal not working correctly; private fields in layout structs aren't checked during layout creation it seems.
  • Fixed Pro Guitar strumming not registering in the first input event received for one.
  • Fixed Pro Keyboard GetKeyMask returning an inverted mask (i.e. bit 24 was key 1 rather than bit 0).
  • Fixed Santroller guitars not having the correct default state value set.
  • Fixed various input control extensions not working on devices that use the new state translation infrastructure.
  • Fixed yellow/green pad/cymbal velocities on Xbox 360 4-lane drumkits being inverted.

Removed

  • The redundant SoloFretCount, TouchFretCount, and EmulatedSoloFretCount constants on RockBandGuitar, GuitarHeroGuitar, and ProGuitar respectively have been removed, in favor of having the one FiveFretGuitar.FretCount constant for everything.
    • The EmulatedFretCount constant on ProGuitar remains for convenience, but is otherwise now directly equivalent to FiveFretGuitar.FretCount.

v0.4.1: Small hotfix for drumkits and input event control enumeration

03 Nov 03:09
43fb11b
Compare
Choose a tag to compare

Missed a couple things and had to fix an error somewhere else, should be all good after this lol

Fixed

  • Drumkits no longer forget to assign their face button controls to their class instance on initialization.
  • Fixed a null-reference exception when using the control enumeration extensions on an InputEventPtr for a device that uses the new state translation infrastructure.

v0.4.0: Control Conflict Fixes, Drums Velocity Support, and Others!

31 Oct 08:17
d0b54db
Compare
Choose a tag to compare

This version fixes a bunch of conflicts between controls which can cause interactive rebinding to not work correctly (#8) and adds support for velocity on both 4-lane and 5-lane drumkits, along with some other fixes and usability improvements!

Please note that several of the changes in this version are API-breaking/behavior-changing, and will need modifications to your code to handle correctly. I do my best to avoid this, but there's a reason this project isn't in v1.0 yet lol


Many of the changes in this version are only possible due to a new state translation architecture I finally put the work into creating, so that state events can be handled manually rather than using hacky custom control types to accomplish the same tasks. I previously thought handling things this way would be impossible if anything happened to use InputSystem.onEvent, since that gets called before a device can handle its own state events. However, the input control extensions that deal with state events/data happen to call into the same interface that allows devices to handle their state manually, and so this issue is circumvented.

Fixed

  • Various control conflicts/duplicate controls on the device layouts have been fixed. Some of the properties on the device classes may still result in duplicate inputs relative to each other, but in these cases both properties will now refer to the same control instance instead of two separate controls. This should fix interactive rebinding not working correctly with these controls.
  • The table velocity on turntables will now truly rest at 0 instead of being just slightly above it.

Added

  • Velocity support for drumkits has now been added! No new controls have been added for this, instead the existing button controls for the pads and cymbals have been made analog. They have also been configured so that any velocity will register as a press, so no special handling will need to be done if you don't care about velocity, so long as things are done relative to the press point (i.e. via isPressed or IsValueConsideredPressed).
  • Support for the emulated 5-fret flags on Pro Guitars has been expanded to include the solo frets as well, along with additional convenience methods for the emulated frets in general.
  • The pedal port on Pro Guitars is now supported as well, at least the digital portion of it. Unsure if it supports analog pedals like the Pro Keyboard does.
  • 5-lane drumkits once again expose dedicated face button controls, this time without being identical to the equivalent drum/cymbal controls. Detection is done to separate the two, and drum hits will mask out any face button presses.

Changed

  • Pro Guitar whammy has been removed, as it is not an actual control that those guitars have.
  • Pro Guitar string velocity is no longer reported directly, as from what I know it is not very reliable and can be confusing to work with if you haven't had experience with them before. Now, only whether or not a strum has occurred is reported; due to how this is determined, the value only lasts for a single frame and must be reset at the end of the frame.
  • The custom control types used internally are now internal instead of public, as these are meant more as implementation details rather than concrete custom control types.
  • XInputSixFretGuitar is now internal as is intended; it was unintentionally left public when all of the implementation device classes were made internal.
  • Strum up/down on 5/6-fret guitars are now directly aliased to d-pad up/down, and no longer have their own distinct control instances.
  • The layout-only velocity controls on Pro Keyboards have been removed. If/when velocity support is implemented, the regular key controls will become analog instead, much like how drums velocity support has been implemented.
  • The euphoria button on turntables is now directly aliased to the north face button control, and no longer has its own distinct control instance.
  • The crossfader control on turntables has been renamed from crossFader to crossfader.
  • Wii Rock Band instruments now have their start/select controls' display names set to Plus and Minus.
  • The effects dial on turntables is now reported as a value in rotations, ranging from 0 inclusive to 1 exclusive.

v0.3.4: A couple small fixes

15 Aug 22:32
202dfc5
Compare
Choose a tag to compare

Fixed

  • Whammy and tilt on PS4 RB4 guitars has been fixed, and the pickup switch is now implemented.
  • Xbox 360 turntables now instantiate correctly again, and are now properly scaled up.

v0.3.3: Santroller HID Updates! (and other new features/fixes)

28 Jul 05:30
85b52c7
Compare
Choose a tag to compare

The report formats for Santroller HID devices have been updated for better efficiency, this version changes the layouts to support those properly.

In other news, the pickup switch on Rock Band guitars is now properly supported, the XInput GuitarBass subtype is now recognized, and PS3 turntable left platter buttons and Wii RB3 keyboard recognition have been fixed.

Added

  • Preliminary support for the XInput GuitarBass subtype has been added. Unsure if it has different input features compared to a regular Rock Band guitar, confirmation needed.

Changed

  • The pickup switch on Xbox 360/PS3/Wii Rock Band guitars is now properly supported. It is now exposed as an integer control instead of an axis, ranging from 0 to 4 for each of the 5 notches on the guitar.
    • The pickup switch on PS4 guitars is not confirmed to be supported, it has to be defined somewhere in the input layout for things to work so I've had to guess where it is for now lol
  • Santroller device support has been updated to support the latest version of the HID reports. (#6 and #7)
  • The control name for the PS button on PS3 instruments has been updated to be more generic (psButton -> systemButton).
  • The instrument button on Wii Rock Band instruments now has the correct display name, rather than appearing as the PS button.

Fixed

  • The left platter buttons on PS3 turntables should now register correctly, they were off by 1 bit lol
  • Wii RB3 Pro Keyboards should now register correctly, they were registered under the PS3 keyboard's hardware IDs on accident.