This project is read-only.

DrumKit class

Accepts input from a drum kit.

This class hasn't been tested thoroughly, so some of these behaviors may be incorrect or vary based on the type of drum kit you're using.


public DrumKit(PlayerIndex playerIndex)
Creates a drum kit object associated with the specified controller index.

Fields / Properties

public GamePadState State
Returns the controller state from the last call to Update.

public bool Red
public bool Yellow
public bool Blue
public bool Orange
public bool Green
public bool Pedal
Returns true if the specified pad or petal was hit since last Update.

public float MagnitudeRed
public float MagnitudeBlue
public float MagnitudePedal
Some drum sets register a number that seems to correspond to how hard certain pads are hit.


public void Update()
Updates the state of the drum kit.

Static Methods / Properties

public static DrumKitCollection ActiveKits
Returns a list of active drum kits attached. This value is updated by calling the Discover and Purge methods.

public static DrumKit[] Discover()
Checks if any new drum kits have been connected since last call and adds them to the ActiveKits collection. Returns an array of the DrumKits that were added.

public static DrumKit[] Purge()
Checks if any drum kits have been disconnected since last call and removes them from the ActiveKits collection. Returns an array of the DrumKits that were removed.

Last edited Jan 4, 2010 at 5:04 AM by dylanwolf, version 2


No comments yet.