|
Anklang-0.3.0.dev551+gad1415e2 anklang-0.3.0.dev551+gad1415e2
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
Generator for MIDI events. More...
#include "clip.hh"
Public Types | |
| using | Receiver = std::function< void(int64 tick, MidiEvent &event)> |
| Handler for generated MIDI events. | |
Public Member Functions | |
| void | setup (const ClipImpl &clip) |
| Create generator from clip. | |
| void | jumpto (int64 target_tick) |
| Assign new play_position() (and clip_position()), preserves all other state. | |
| int64 | generate (int64 target_tick, const Receiver &receiver) |
Advance tick and call receiver for generated events. | |
| bool | muted () const |
| Mute MIDI note generation. | |
| void | muted (bool b) |
| Assign muted state. | |
| int64 | start_offset () const |
| Initial offset in ticks. | |
| int64 | loop_start () const |
| Loop start in ticks. | |
| int64 | loop_end () const |
| Loop end in ticks. | |
| int64 | play_length () const |
| Maximum amount of ticks during playback. | |
| int64 | play_position () const |
| Current playback position in ticks. | |
| bool | done () const |
| Check if playback is done. | |
| int64 | clip_position () const |
| Position within clip as tick. | |
Friends | |
| class | ClipImpl |
| using Ase::ClipImpl::Generator::Receiver = std::function<void (int64 tick, MidiEvent &event)> |
| int64 Ase::ClipImpl::Generator::clip_position | ( | ) | const |
| bool Ase::ClipImpl::Generator::done | ( | ) | const |
Check if playback is done.
Definition at line 97 of file clip.hh.
References play_length(), and play_position().
Advance tick and call receiver for generated events.
Definition at line 360 of file clip.cc.
References std::min(), return_unless, Ase::ClipNote::tick, and Ase::MidiEvent::type.
| void Ase::ClipImpl::Generator::jumpto | ( | int64 | target_tick | ) |
Assign new play_position() (and clip_position()), preserves all other state.
Definition at line 321 of file clip.cc.
References std::min(), and return_unless.
| int64 Ase::ClipImpl::Generator::loop_end | ( | ) | const |
| int64 Ase::ClipImpl::Generator::loop_start | ( | ) | const |
| bool Ase::ClipImpl::Generator::muted | ( | ) | const |
| void Ase::ClipImpl::Generator::muted | ( | bool | b | ) |
| int64 Ase::ClipImpl::Generator::play_length | ( | ) | const |
| int64 Ase::ClipImpl::Generator::play_position | ( | ) | const |
| void Ase::ClipImpl::Generator::setup | ( | const ClipImpl & | clip | ) |
Create generator from clip.
Definition at line 302 of file clip.cc.
References Ase::ClipImpl::tick_events().
| int64 Ase::ClipImpl::Generator::start_offset | ( | ) | const |