# Grid and Snap

{% embed url="<https://youtu.be/W7vyE7GzDT4>" %}

The grid provides a measure of time, displayed as spaced vertical lines and labels along the timeline ruler denoting significant increments of time.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FMcCKzEcCOJLoWqaC03So%2Fimage.png?alt=media&#x26;token=766674a2-865b-459f-a7a2-e23fd19c1170" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2F4rclqIOh44CYAqgceLPP%2Fimage.png?alt=media&#x26;token=938522e1-0100-46b1-837c-5dc4efab224a" alt=""><figcaption></figcaption></figure>

## <img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FwJlceBE8hHeDR7MOyISy%2Fimage.png?alt=media&#x26;token=b3d3bade-d615-4ba2-ab7d-be860ecce614" alt="" data-size="original"> Grid Toggle

This toggles the grid display on and off. The grid is based on the time units selected.

{% hint style="success" %}
Use the keyboard shortcut **R** to toggle the grid on and off.
{% endhint %}

{% hint style="info" %}
Grid snapping can still be used even if the grid is not currently displayed.&#x20;
{% endhint %}

## Grid Time Format

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2F7QR8L8cfLbxdZ9nvIhwq%2Fimage.png?alt=media&#x26;token=95cfaf65-b274-418a-9c55-a11e131615b4" alt=""><figcaption></figcaption></figure>

Use the drop-down menu to select the time format. Whichever format is selected affects how the grid is displayed and what increments of time are used. This also affects snapping, which always snaps to increments on the grid. See [Display Formats](https://axongenesis.gitbook.io/timeflow/timeflow-editor/time#display-format) for more information on time formats.

## Grid Divisions

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FwZ4eutBa0FnDZhO1bAtZ%2Fimage.png?alt=media&#x26;token=06b9581d-7722-4e92-b233-221312180b39" alt=""><figcaption></figcaption></figure>

The other drop-down menu, to the left of the grid time format, sets the number of divisions to show in the grid. The lower the number, the more divisions shown, while higher numbers show a more sparse grid with larger time increments.

{% hint style="warning" %}
The [Time Signature](https://axongenesis.gitbook.io/timeflow/user-guide/timeflow-view/toolbar/musical-timing) (if other than 4/4) also affects the display of the grid so that it naturally shows the expected beats per bar.
{% endhint %}

{% hint style="success" %}
**Shortcuts to increase/decrease grid resolution**

Use the number **1** key to decrease the grid divisions, and the number **2** key to increase divisions. The Timeflow view must have keyboard focus.
{% endhint %}

## Minor Grid lines

The preference setting '[Draw Minor Grid Lines](https://axongenesis.gitbook.io/timeflow/menus-and-shortcuts/preferences/time#draw-minor-grid-lines)' may be enabled to further subdivide the grid into smaller increments, indicated by lighter vertical between the major snap lines.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FAxv4hj0EjlSj5m31CZh3%2Fimage.png?alt=media&#x26;token=0638a4dc-9a74-4458-9929-38d3191a5fc6" alt=""><figcaption><p>The view with minor grid lines off. Vertical division lines are only drawn for the selected grid increment.</p></figcaption></figure>

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2F9mkXaGYyf8HRQycGvQ0M%2Fimage.png?alt=media&#x26;token=bce5180f-47ed-427c-9ebd-6a583309669b" alt=""><figcaption><p>Minor grid lines enabled. Notice the lighter color lines subdividing the primary time.</p></figcaption></figure>

This feature also takes into consideration musical timing and can aid in visualizing the time signature.

{% hint style="info" %}
When minor grid lines are displayed, they are also snappable.
{% endhint %}

## <img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2F5BP0N4sqMRoHb3GqSiMo%2Fimage.png?alt=media&#x26;token=450ee333-7a8c-4660-b8e3-8e034dfee975" alt="" data-size="original"> Snap Time

Snapping to the time grid is helpful for precise synchronization and works with everything that can be moved in time including keyframes, tracks, events, markers, and when dragging the playhead.&#x20;

{% hint style="success" %}
**Snap On-Demand**

Snapping can be used when moving anything in time by holding the **Alt** key while dragging. This snaps to the current time grid or the playhead. This modifier can be added before or after dragging has begun. This also snaps keyframe values when working in the Graph View.&#x20;

*Note that if Snap Time is already enabled, holding the **Alt** key temporarily disables snapping instead.*
{% endhint %}

{% hint style="success" %}
Use the keyboard shortcut **H** to toggle time snapping on and off.
{% endhint %}

{% hint style="info" %}
**Step by Grid Increments**

Use the keyboard shortcuts **Control + PageUp** and **Control + PageDown** to move the playhead forward or backward to the next nearest grid increment.
{% endhint %}

{% hint style="warning" %}
**Snap and Time Offset**\
Snapping works in the local time space of the object. If the object or channel [time offset](https://axongenesis.gitbook.io/timeflow/timeflow-editor/update-settings#time-offset) is set to a non-integral value (i.e. between grid increments) then its keyframes may appear off alignment from the grid when snapped. This is normal behavior, but if not desired, adjust the time offset of the object to match the grid increments.
{% endhint %}

## <img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FxNDBLPLJyHq6pGALfaHq%2Fimage.png?alt=media&#x26;token=e328c30c-bb2c-48c2-a366-5675e521573c" alt="" data-size="original"> Snap Value

This feature is only applied in the [Graph View](https://axongenesis.gitbook.io/timeflow/user-guide/timeflow-view/graph-view). Use this to snap keyframe values to the grid displayed. The value grid is generated automatically based on the view scale and is not affected by the grid divisions or time format. Finer adjustments can be made by zooming in further.&#x20;

{% hint style="success" %}
Use the keyboard shortcut **J** to toggle value snapping on and off.
{% endhint %}

{% hint style="success" %}
**Snap Value On-Demand**

Snapping on-demand holding the **Alt** key also applies value snapping when in the Graph View.
{% endhint %}

{% hint style="success" %}
**Snap Constraint**\
To snap the time of a keyframe on-demand without affecting its value, add the **Shift** key to constrain movement. This forces a choice between either snapping the value vertically, or snapping time horizontally, based on the direction dragged.
{% endhint %}
