> For the complete documentation index, see [llms.txt](https://rhythm-engine.gitbook.io/rhythm-engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rhythm-engine.gitbook.io/rhythm-engine/docs/extensions/beatsequencer.md).

# BeatSequencer

MonoBehaviour

A class that can be used to watch for a sequence of beats and trigger events when the sequence is played

## Fields

<table data-full-width="true"><thead><tr><th width="444">Field</th><th>Description</th></tr></thead><tbody><tr><td><a href="/rhythm-engine/docs/extensions/beatsequencer/beatsequence/beatsequencelist.md">BeatSequenceList </a>BeatSequences</td><td>The list of BeatSequences to play</td></tr><tr><td>List&#x3C;<a href="/rhythm-engine/docs/extensions/beatsequencer/beatsequencechange.md">BeatSequenceChange</a>>BeatSequenceChanges</td><td>The list of sequence changes throughout the song</td></tr><tr><td>Action&#x3C;int> OnInstrumentStep</td><td>Called when the sequencer steps through the sequence. The parameter is the index of the instrument that was triggered</td></tr></tbody></table>

## Methods

<table data-full-width="true"><thead><tr><th width="344">Method</th><th>Description</th></tr></thead><tbody><tr><td><p>void CallOnNextInstrumentStep</p><p>(int instrumentIndex, Action callback)</p></td><td><p>Assign a callback to be called when the next step of an instrument is triggered. Can be useful for example to trigger a particle effect when a drum is hit.<br><br>instrumentIndex - Instrument you want the callback to happen on </p><p>callback - The callback to be called</p></td></tr></tbody></table>
