Anklang-0.3.0.dev956+gd75ac925 anklang-0.3.0.dev956+gd75ac925
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 uint midi_channel_ = 0;
18 friend class ProjectImpl;
19 friend class TrackStateListener;
20 virtual ~TrackImpl ();
21protected:
22 String fallback_name () const override;
23 void update_telemetry ();
24public:
25 class ClipScout;
26 explicit TrackImpl (ProjectImpl&, bool masterflag);
27 explicit TrackImpl (tracktion::Track &track);
28 bool is_folder () const { return "Folder" == te_type_; }
29 String name () const override;
30 void name (const std::string &n) override;
31 DeviceInfo device_info () override;
32 ProjectImpl* project () const;
33 bool is_master () const override;
34 bool is_muted () const override;
35 void set_muted (bool muted) override;
36 bool is_hidden () const override;
37 void set_hidden (bool hidden) override;
38 bool is_solo () const override;
39 void set_solo (bool solo) override;
40 double volume () const override;
41 void volume (double db) override;
42 double pan () const override;
43 void pan (double pan) override;
44 void remove_self () override;
45 int32 midi_channel () const override { return midi_channel_; }
46 void midi_channel (int32 midichannel) override;
47 ClipS launcher_clips () override;
48 DeviceP access_device () override;
49 MonitorP create_monitor (int32 ochannel) override;
50 ssize_t clip_index (const ClipImpl &clip) const;
51 int clip_succession (const ClipImpl &clip) const;
52 TelemetryFieldS telemetry () const override;
53 enum { NONE = -1 };
54 ClipP create_midi_clip (const String &name, double start, double length) override;
55 ClipP create_audio_clip (const String &name, double start, double length) override;
56 PluginP create_plugin (const String &type) override;
57 PluginS list_plugins () override;
58 static TrackImplP from_trkn (tracktion::Track&);
59};
60
63 friend class TrackImpl;
64 std::vector<int> indices_;
65 int last_ = -1;
66public:
67 enum { NONE = TrackImpl::NONE, };
68 // constructors
69 explicit ClipScout () noexcept;
70 void setup (const std::vector<int> &indices);
71 int advance (int previous);
72 void update (const ClipScout &other);
73 void reset ();
74};
75
76} // Ase
77
Mimick tracktion::engine::SafeSelectable<> for tracktion::Selectable descendants.
Definition trkn-utils.hh:27
MIDI clip playback succession generator.
Definition track.hh:62
int advance(int previous)
Determine clip succession.
Definition track.cc:400
void reset()
Reset state (history), preserves succession order.
Definition track.cc:411
void setup(const std::vector< int > &indices)
Setup clip succession order.
Definition track.cc:393
void update(const ClipScout &other)
Assign new succession order, preserves history.
Definition track.cc:418
Ase::Track implementation.
Definition track.hh:10
double volume() const override
Get track volume in dB.
Definition track.cc:253
double pan() const override
Get track pan (-1.0 to 1.0).
Definition track.cc:272
ClipS launcher_clips() override
Retrieve the list of clips that can be directly played.
Definition track.cc:291
bool is_muted() const override
Check if track is muted.
Definition track.cc:200
void set_hidden(bool hidden) override
Set track hidden state.
Definition track.cc:223
void set_muted(bool muted) override
Set track muted state.
Definition track.cc:208
ClipP create_audio_clip(const String &name, double start, double length) override
Create a new audio clip on this track.
Definition track.cc:444
bool is_master() const override
Flag set on the main output track.
Definition track.cc:245
DeviceP access_device() override
Retrieve Device handle for this track.
Definition track.cc:332
DeviceInfo device_info() override
Describe this Device type.
Definition track.cc:365
TelemetryFieldS telemetry() const override
Create signal monitor for an output channel.
Definition track.cc:344
PluginS list_plugins() override
List plugins on this track.
Definition track.cc:481
ClipP create_midi_clip(const String &name, double start, double length) override
Create a new MIDI clip on this track.
Definition track.cc:424
bool is_solo() const override
Check if track is soloed.
Definition track.cc:230
PluginP create_plugin(const String &type) override
Create a new plugin on this track by type identifier.
Definition track.cc:464
bool is_hidden() const override
Check if track is hidden from view.
Definition track.cc:215
int32 midi_channel() const override
Midi channel assigned to this track, 0 uses internal per-track channel.
Definition track.hh:45
void set_solo(bool solo) override
Set track solo state.
Definition track.cc:238
void remove_self() override
Remove self from parent container.
Definition track.cc:371
Container for Clip objects and sequencing information.
Definition api.hh:262
#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
std::string String
Convenience alias for std::string.
Definition cxxaux.hh:34
uint32_t uint
Provide 'uint' as convenience type.
Definition cxxaux.hh:17
Info for device types.
Definition api.hh:200
typedef ssize_t