diff --git a/packages/gamepad/docs/gamepad.mdx b/packages/gamepad/docs/gamepad.mdx index 9fafb072..197b90ee 100644 --- a/packages/gamepad/docs/gamepad.mdx +++ b/packages/gamepad/docs/gamepad.mdx @@ -11,7 +11,8 @@ Initialize a gamepad by calling the gamepad() function with an optional index pa ## Available Controls @@ -38,6 +39,12 @@ The gamepad module provides access to buttons and analog sticks as normalized si | Right Stick | `x2`, `y2` (0 to 1 range) | | | `x2_2`, `y2_2` (-1 to 1 range) | +### Button Sequence + +| Stick | Controls | +| ----------- | ------------------------------ | +| Button Sequence | `btnSequence()`, `btnSeq()`, `btnseq()`| + ## Using Gamepad Inputs Once initialized, you can use various gamepad inputs in your patterns. Here are some examples: @@ -48,12 +55,16 @@ You can use button inputs to control different aspects of your music, such as ga ### Analog Stick Inputs @@ -62,28 +73,38 @@ Analog sticks can be used for continuous control, such as pitch shifting or pann ### Button Sequences You can define button sequences to trigger specific actions, like playing a sound when a sequence is detected. - +// Check butto-n sequence (returns 1 while detected, 0 when not within last 1 second) +$: s("free_hadouken -").slow(2) +.gain(gp.btnSequence(HADOUKEN)).room(1).cpm(120) + +// hadouken.wav by Syna-Max +//https://freesound.org/people/Syna-Max/sounds/67674/ +samples({free_hadouken: 'https://cdn.freesound.org/previews/67/67674_111920-lq.mp3'}) +`} /> ## Multiple Gamepads