10#ifndef __AUDIO_SNAP_GRID_H__
11#define __AUDIO_SNAP_GRID_H__
15#include <glib/gi18n.h>
23#define SNAP_GRID_TIMELINE (PROJECT->snap_grid_timeline)
24#define SNAP_GRID_EDITOR (PROJECT->snap_grid_editor)
26#define SNAP_GRID_IS_EDITOR(sg) (SNAP_GRID_EDITOR == sg)
27#define SNAP_GRID_IS_TIMELINE(sg) (SNAP_GRID_TIMELINE == sg)
29#define SNAP_GRID_ANY_SNAP(sg) (sg->snap_to_grid || sg->snap_to_events)
30#define SNAP_GRID_DEFAULT_MAX_BAR 10000
48note_length_get_strings (
void);
50note_length_to_str (NoteLength len);
60note_type_get_strings (
void);
81 SNAP_GRID_TYPE_TIMELINE,
82 SNAP_GRID_TYPE_EDITOR,
143 NoteLength note_length,
147snap_grid_get_ticks_from_length_and_type (NoteLength length,
NoteType type);
156snap_grid_get_snap_frames (
const SnapGrid * self);
199 const bool return_prev);
NONNULL int snap_grid_get_snap_ticks(const SnapGrid *self)
Gets a snap point's length in ticks.
char * snap_grid_stringize(SnapGrid *self)
Returns the grid intensity as a human-readable string.
SnapGridType
Snap grid type.
int snap_grid_get_default_ticks(SnapGrid *self)
Gets a the default length in ticks.
char * snap_grid_stringize_length_and_type(NoteLength note_length, NoteType note_type)
Returns the grid intensity as a human-readable string.
NONNULL bool snap_grid_get_nearby_snap_point(Position *ret_pos, const SnapGrid *const self, const Position *pos, const bool return_prev)
Returns the next or previous SnapGrid point.
@ NOTE_TYPE_TRIPLET
3/2 of its original size
@ NOTE_TYPE_DOTTED
2/3 of its original size
@ NOTE_LENGTH_LAST_OBJECT
Use last created object's length.
@ NOTE_LENGTH_LINK
Link length with snap setting.
@ NOTE_LENGTH_CUSTOM
Custom length.
A Position is made up of bars.beats.sixteenths.ticks.
bool default_adaptive
If this is on, the default note length will be determined automatically based on the current zoom lev...
bool snap_to_grid_keep_offset
Whether to keep the offset when moving items.
NoteLengthType length_type
See NoteLengthType.
NoteType snap_note_type
Snap note type.
bool snap_to_grid
Whether to snap to the grid.
NoteLength snap_note_length
Snap note length.
bool snap_adaptive
If this is on, the snap note length will be determined automatically based on the current zoom level.
bool snap_to_events
Whether to snap to events.
NoteType default_note_type
Default note type.
NoteLength default_note_length
Default note length.