22  int64 starttick_ = 0, stoptick_ = 0, endtick_ = 0;
 
   29    EventImage (
const ClipNoteS &clipnotes);
 
   33  void          apply_undo     (
const EventImage &image, 
const String &undogroup);
 
   34  static size_t collapse_notes (EventsById ¬es, 
bool preserve_selected);
 
   39  Connection ontrackchange_;
 
   44  ClipNoteS get_all_notes   () 
const override;
 
   45  void      set_all_notes   (
const ClipNoteS ¬es) 
override;
 
   46  int64     get_end_tick    () 
const override;
 
   47  void      set_end_tick    (
int64 etick) 
override;
 
   49  using OrderedEventsP = OrderedEventsV::ConstP;
 
   52  void           push_undo      (
const ClipNoteS &clipnotes, 
const String &undogroup);
 
   53  UndoScope      undo_scope     (
const String &scopename) { 
return project()->undo_scope (scopename); }
 
   58  bool           needs_serialize() 
const;
 
 
   69  int64  start_offset_ = 0;
 
   70  int64  loop_start_ = 0;
 
   71  int64  loop_end_ = I63MAX;
 
   83  bool  muted         ()
 const { 
return muted_; }
 
   85  void  muted         (
bool b) { muted_ = b; }
 
 
  106ClipImpl::CmpNoteIds::operator () (
const ClipNote &a, 
const ClipNote &b)
 const 
  108  return Aux::compare_lesser (a.id, b.id);
 
  112ClipImpl::CmpNoteTicks::operator() (
const ClipNote &a, 
const ClipNote &b)
 const 
  115  const int tcmp = Aux::compare_lesser (a.tick, b.tick);
 
  118  const int kcmp = Aux::compare_lesser (a.key, b.key);
 
  121  const int ccmp = Aux::compare_lesser (a.channel, b.channel);
 
  125  const int scmp = Aux::compare_lesser (a.selected, b.selected);
 
  128  return Aux::compare_lesser (a.id, b.id);
 
  131String stringify_clip_note (
const ClipNote &n);
 
Generator for MIDI events.
 
void setup(const ClipImpl &clip)
Create generator from clip.
 
bool muted() const
Mute MIDI note generation.
 
bool done() const
Check if playback is done.
 
int64 clip_position() const
Position within clip as tick.
 
int64 loop_start() const
Loop start in ticks.
 
int64 generate(int64 target_tick, const Receiver &receiver)
Advance tick and call receiver for generated events.
 
int64 start_offset() const
Initial offset in ticks.
 
void jumpto(int64 target_tick)
Assign new play_position() (and clip_position()), preserves all other state.
 
int64 play_position() const
Current playback position in ticks.
 
void muted(bool b)
Assign muted state.
 
int64 play_length() const
Maximum amount of ticks during playback.
 
int64 loop_end() const
Loop end in ticks.
 
void assign_range(int64 starttick, int64 stoptick) override
 
int64 start_tick() const override
Get the first tick intended for playback (this is >= 0), changes on notify:start_tick.
 
ClipNoteS list_all_notes() override
 
int32 change_batch(const ClipNoteS ¬es, const String &undogroup) override
Change note id according to the arguments or add a new note if id < 0; emits notify:notes.
 
int64 stop_tick() const override
Get the tick to stop playback, not events should be played after this, changes on notify:stop_tick.
 
void serialize(WritNode &xs) override
Serialize members and childern.
 
OrderedEventsP tick_events() const
Retrieve const vector with all notes ordered by tick.
 
Container for MIDI note and control events.
 
Base type for classes that have a Property.
 
Ase::Track implementation.
 
One entry in a Writ serialization document.
 
#define ASE_DEFINE_MAKE_SHARED(CLASS)
 
#define ASE_UNLIKELY(expr)
Compiler hint to optimize for expr evaluating to false.
 
#define ASE_ISLIKELY(expr)
Compiler hint to optimize for expr evaluating to true.
 
The Anklang C++ API namespace.
 
int32_t int32
A 32-bit signed integer.
 
int64_t int64
A 64-bit unsigned integer, use PRI*64 in format strings.
 
constexpr const uint MIDI_NOTE_ID_LAST
Last valid (internal) MIDI note event ID.
 
constexpr const uint MIDI_NOTE_ID_FIRST
First (internal) MIDI note event ID (lower IDs are reserved for external notes).
 
std::string String
Convenience alias for std::string.
 
uint32_t uint
Provide 'uint' as convenience type.
 
Part specific note event representation.
 
MidiEvent data structure.
 
Container for a sorted array of opaque Event structures with binary lookup.