> 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/beatsequence.md).

# BeatSequence

ScriptableObject

A 2d array of booleans that represents a sequence of beats

## Fields

<table data-full-width="true"><thead><tr><th width="284">Field</th><th>Description</th></tr></thead><tbody><tr><td>int StepCount</td><td>The number of steps in a sequence</td></tr><tr><td>int InstrumentCount</td><td>The number of instruments in a sequence</td></tr><tr><td>float SequenceLength</td><td>The length of a sequence in bars</td></tr></tbody></table>

## Methods

<table data-full-width="true"><thead><tr><th width="369">Method</th><th>Description</th></tr></thead><tbody><tr><td>int GetLength(int dimension)</td><td>Get either the step count or the instrument count<br><br>dimension - 0 or 1, Step Count or Instrument Count</td></tr><tr><td>float GetSequenceLength()</td><td>Get the length of a sequence in bars</td></tr><tr><td>int Length()</td><td>Get the length of a sequence in beats</td></tr><tr><td>void ChangeStepsLength(int newLength)</td><td>Change the length of a sequence in beats<br><br>newLength - New length in beats</td></tr></tbody></table>
