# Play music with a game controller

> Connect your controller, play a chord progression, then turn a trigger into editable MIDI expression.

Canonical: https://maru.audio/docs/play-music-with-a-game-controller
Documentation index: https://maru.audio/llms.txt

Open [Gamepad Chords](https://maru.audio/plugins/@felix/gamepad-chords) to play an instrument, or
[Controller MIDI](https://maru.audio/plugins/@felix/controller-midi) to create editable note, CC and pitch-bend
assignments for another instrument. Both apps run in your browser. You need a
browser with Gamepad API support and a controller connected by USB or paired
through your operating system's Bluetooth settings.

For development in the Maru source workspace, the
[SDK setup reference](https://maru.audio/docs/controllers.md#open-the-source-examples)
contains the local workbench commands. Keep audio muted until you choose to listen.

## Connect and check one gesture

1. Focus the app and select **Connect controller**. Press a controller
   button, then select your device or keep Automatic selection.
2. In Gamepad Chords, open **Controller**. In Controller MIDI, use
   **Calibration & feedback**. Press and release one button, move both sticks,
   and squeeze each trigger slowly. Check that the values follow your movement.
3. Return to the musical view and release the controls before playing. Click
   **Unmute** in the player when you want to listen.

The browser can read a gamepad directly; this path needs no local MIDI relay.
MIDI access has separate browser permissions. If the host reports controller
input unavailable, or raw values move without named controls, use
[Troubleshoot controller input](https://maru.audio/docs/troubleshoot-controller-input.md).

## Play a four-chord phrase

In Gamepad Chords, select **Start instrument**, choose **Home** under
**Progression**, and keep C major and root position in **Harmony settings**.
The four face buttons play C3, E3, G3 and B3. Watch each tone pad and piano key
light up, then go dark on release.

Play all four tones, then use the right bumper to move to the next chord.
The D-pad selects the four steps directly. Hold a tone across a chord change:
its pitch stays fixed until release. The left trigger changes the next note's
velocity; the right trigger shapes a held note's expression.

Try **Borrowed color**, change the notation to Roman numerals, and compare the
same sequence in another key. **Shuffle**, or Options/Menu, generates a new
diatonic set or rearranges a chord sheet. Selecting the named progression again
restores its template. Practice counts explored tones, not rhythmic accuracy.

## Turn a trigger into a filter control

Controller MIDI makes no sound itself. Select **Effects · sticks & triggers to
CC**, select the left trigger, set **CC number** to 74, and choose your receiver's
**Channel**. Keep the MIDI range at 0–127. Select **Enable MIDI mapping**, then
squeeze slowly and inspect the changing values.

Route this module's MIDI output to an instrument and assign CC74 to its filter.
The receiving instrument decides what CC74 does. For a DAW or native receiver,
follow [Choose a controller connection](https://maru.audio/docs/controller-connections.md);
opening a browser MIDI output does not create a virtual MIDI port.

**Learn input** listens for a fresh movement while mapping is stopped. Edit the
learned assignment, then re-enable mapping. **MIDI transpose** is a separate
view for shifting ordinary routed MIDI notes.

To learn a MIDI keyboard, pad or fader directly, open the player in its own tab:
on the module page, open **Share**, find **Embed**, and open the address inside
`src="…"` in a new tab. Use that player's **Connect controller** and allow MIDI
access when asked. Gamepad mapping works on the module page itself; MIDI sent
through its playback bar also reaches **MIDI transpose**.

## Inspect, share and stop

**MIDI request inspector** shows requested messages before transposition;
local acceptance does not confirm receipt at the instrument. Check the
receiver as well. If sound remains held, stop mapping and use **All notes off**.

Where the host offers preset sharing, share the edited configuration through
its preset menu. The recipient reconnects their own device and destination and
enables mapping deliberately. Device selection and permissions stay local.

Try vibration only when the inspector offers it. Trigger travel and adaptive
trigger resistance are different features; controller names alone do not prove
feedback support.
