Anklang-0.3.0-1416-gfa8ce8d2 anklang-0.3.0-1416-gfa8ce8d2
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
track.hh
Go to the documentation of this file.
1 // This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0
2#pragma once
3
4#include <ase/trkn-utils.hh>
5#include <ase/device.hh>
6
7namespace Ase {
8
10class TrackImpl : public DeviceImpl, public virtual Track {
12 ProjectImpl *project_ = nullptr;
15 std::string te_type_;
16 tracktion::VolumeAndPanPlugin* volume_plugin () const;
18 friend class ProjectImpl;
19 friend class TrackStateListener;
20 virtual ~TrackImpl ();
21protected:
22 void update_telemetry ();
23public:
24 class ClipScout;
25 explicit TrackImpl (ProjectImpl&, bool masterflag);
26 explicit TrackImpl (tracktion::Track &track);
27 bool is_folder () const { return "Folder" == te_type_; }
28 String name () const override;
29 void name (const std::string &n) override;
30 DeviceInfo device_info () override;
31 ProjectImpl* project () const;
32 bool is_master () const override;
33 bool is_control_track () const override;
34 bool muted () const override;
35 void muted (bool muted) override;
36 bool hidden () const override;
37 void hidden (bool hidden) override;
38 bool solo () const override;
39 void solo (bool solo) override;
40 float volume_db () const override;
41 void volume_db (float db) override;
42 float slider_pos () const override;
43 void slider_pos (float pos) override;
44 float pan () const override;
45 void pan (float pan) override;
46 void remove_self () override;
47 StringS read_only_properties () const override;
48 ClipS launcher_clips () const override;
49 void launcher_clips (const ClipS &) override;
50 DeviceP access_device () override;
51 MonitorP create_monitor (int32 ochannel) override;
52 ssize_t clip_index (const ClipImpl &clip) const;
53 int clip_succession (const ClipImpl &clip) const;
54 TelemetryFieldS telemetry () const override;
55 enum { NONE = -1 };
56 ClipP create_midi_clip (const String &name, double start, double length) override;
57 ClipP create_audio_clip (const String &name, double start, double length) override;
58 PluginP create_plugin (const String &type) override;
59 PluginS list_plugins () override;
60 static TrackImplP from_trkn (tracktion::Track&);
61};
62
65 friend class TrackImpl;
66 std::vector<int> indices_;
67 int last_ = -1;
68public:
69 enum { NONE = TrackImpl::NONE, };
70 // constructors
71 explicit ClipScout () noexcept;
72 void setup (const std::vector<int> &indices);
73 int advance (int previous);
74 void update (const ClipScout &other);
75 void reset ();
76};
77
78} // Ase
79
Mimick tracktion::engine::SafeSelectable<> for tracktion::Selectable descendants.
Definition trkn-utils.hh:35
MIDI clip playback succession generator.
Definition track.hh:64
int advance(int previous)
Determine clip succession.
Definition track.cc:447
void reset()
Reset state (history), preserves succession order.
Definition track.cc:458
void setup(const std::vector< int > &indices)
Setup clip succession order.
Definition track.cc:440
void update(const ClipScout &other)
Assign new succession order, preserves history.
Definition track.cc:465
Ase::Track implementation.
Definition track.hh:10
float volume_db() const override
Get track volume in dB.
Definition track.cc:272
StringS read_only_properties() const override
List x()/x (v) properties that this object can't change, their setters ignore the value or warn.
Definition track.cc:317
ClipS launcher_clips() const override
Retrieve the list of clips that can be directly played; changes on notify:launcher_clips.
Definition track.cc:331
ClipP create_audio_clip(const String &name, double start, double length) override
Create a new audio clip on this track.
Definition track.cc:491
float pan() const override
Get track pan (-1.0 to 1.0).
Definition track.cc:302
bool is_master() const override
Flag set on the main output track.
Definition track.cc:243
DeviceP access_device() override
Retrieve Device handle for this track.
Definition track.cc:379
DeviceInfo device_info() override
Describe this Device type.
Definition track.cc:412
TelemetryFieldS telemetry() const override
Create signal monitor for an output channel.
Definition track.cc:391
PluginS list_plugins() override
List plugins on this track.
Definition track.cc:528
bool is_control_track() const override
Flag set on tempo/marker/chord/arranger/master tracks.
Definition track.cc:251
ClipP create_midi_clip(const String &name, double start, double length) override
Create a new MIDI clip on this track.
Definition track.cc:471
float slider_pos() const override
Get track volume fader position.
Definition track.cc:287
bool muted() const override
Check if track is muted.
Definition track.cc:198
PluginP create_plugin(const String &type) override
Create a new plugin on this track by type identifier.
Definition track.cc:511
bool hidden() const override
Check if track is hidden from view.
Definition track.cc:213
void remove_self() override
Remove self from parent container.
Definition track.cc:418
bool solo() const override
Check if track is soloed.
Definition track.cc:228
Container for Clip objects and sequencing information.
Definition api.hh:278
#define ASE_DEFINE_MAKE_SHARED(CLASS)
Define a member function static shared_ptr<CLASS> make_shared(ctorargs...);.
Definition cxxaux.hh:274
The Anklang C++ API namespace.
Definition api.hh:8
int32_t int32
A 32-bit signed integer.
Definition cxxaux.hh:27
Info for device types.
Definition api.hh:202
typedef ssize_t