Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
chord_track.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2018-2020 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
12#ifndef __AUDIO_CHORD_TRACK_H__
13#define __AUDIO_CHORD_TRACK_H__
14
15#include <stdint.h>
16
17#include "dsp/track.h"
18
25#define P_CHORD_TRACK (TRACKLIST->chord_track)
26
27typedef struct ChordObject ChordObject;
28typedef struct _ChordTrackWidget ChordTrackWidget;
29typedef struct MusicalScale MusicalScale;
30
31typedef struct Track ChordTrack;
32
36ChordTrack *
37chord_track_new (int track_pos);
38
42void
44
49void
50chord_track_insert_chord_region (ChordTrack * track, ZRegion * region, int idx);
51
55void
56chord_track_insert_scale (ChordTrack * track, ScaleObject * scale, int pos);
57
61void
62chord_track_add_scale (ChordTrack * track, ScaleObject * scale);
63
67void
68chord_track_remove_scale (ChordTrack * self, ScaleObject * scale, bool free);
69
73void
74chord_track_remove_region (ChordTrack * self, ZRegion * region);
75
76bool
77chord_track_validate (Track * self);
78
82#define chord_track_get_chord_at_playhead(ct) \
83 chord_track_get_chord_at_pos (ct, PLAYHEAD)
84
91
95#define chord_track_get_scale_at_playhead(ct) \
96 chord_track_get_scale_at_pos (ct, PLAYHEAD)
97
104
110void
111chord_track_clear (ChordTrack * self);
112
117#endif
The backend for a timeline track.
ChordObject * chord_track_get_chord_at_pos(const Track *ct, const Position *pos)
Returns the ChordObject at the given Position in the TimelineArranger.
void chord_track_remove_scale(ChordTrack *self, ScaleObject *scale, bool free)
Removes a scale from the chord Track.
ChordTrack * chord_track_new(int track_pos)
Creates a new chord Track.
void chord_track_add_scale(ChordTrack *track, ScaleObject *scale)
Adds a scale to the track.
void chord_track_insert_scale(ChordTrack *track, ScaleObject *scale, int pos)
Inserts a scale to the track.
void chord_track_init(Track *track)
Inits a chord track (e.g.
void chord_track_clear(ChordTrack *self)
Removes all objects from the chord track.
ScaleObject * chord_track_get_scale_at_pos(const Track *ct, const Position *pos)
Returns the ScaleObject at the given Position in the TimelineArranger.
void chord_track_remove_region(ChordTrack *self, ZRegion *region)
Removes a region from the chord track.
void chord_track_insert_chord_region(ChordTrack *track, ZRegion *region, int idx)
Inserts a chord region to the Track at the given index.
A ChordObject to be shown in the TimelineArrangerWidget.
Musical scale descriptor.
Definition scale.h:132
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:126
A ScaleObject to be shown in the TimelineArrangerWidget.
Track to be inserted into the Project's Tracklist.
Definition track.h:177
int pos
Position in the Tracklist.
Definition track.h:184
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
Definition region.h:72