template<typename Store, typename Pass, int MaxLayers>
struct Nodes::Looper::pass_stack< Store, Pass, MaxLayers >
The passes of a loop, one over the other, whatever they hold.
A pass is the first recording or an overdub on top of it. Undo hides the newest one and redo shows it again; erase takes one out for good; mute keeps one but does not hear it; a pass past Max layers is merged with another, or takes the place of one, which is set aside for undo to put back. The stack does the bookkeeping of all of it, the same for every looper: which passes are heard and which redo brings back, the length each one repeats with, the length of the loop before and after each one, which ones are muted, the layer set aside and the merge undo can take apart.
Pass holds, besides what the looper keeps of its own for a pass (a buffer, a gain...), period, loop_before, loop_after and muted, and is copied whole as the passes move. What a pass recorded may instead be kept apart, each piece tagged with the index of its pass and with the passes that replace it, e.g. MIDI events: Store moves those along as the passes move, through these hooks, which tagged_material below implements for any such piece:
void passes_changed(); // what is heard of the passes changed bool may_remove(int k) const; // pass k can be erased or set aside now void muting(int k); // pass k is about to be muted or unmuted void removing(int k); // pass k is about to be erased or set // aside: the passes over it move down void erased(int k); // pass k is erased: its material goes void aside_taken(int k); // pass k goes to the side void aside_returned(int k); // the pass set aside comes back at k void aside_forgotten(); // the pass set aside is gone for good void redo_dropped(bool aside); // passes from count on are gone for // good, the one set aside kept if aside void unmerge_dropped(); // the last merge cannot be undone now void unmerged(int at); // the last merge, of at and the pass // over it, is undone void cleared(); // every pass is gone void undoing(); // undo or redo is about to act
|
|
bool | empty () const noexcept |
| |
|
Pass * | top () noexcept |
| |
|
int64_t | period_of (const Pass &l) const noexcept |
| |
|
int64_t | period_of (int pass) const noexcept |
| |
|
int64_t | merged_period (const Pass &a, const Pass &b) const noexcept |
| | The period two passes merged into one repeat with.
|
| |
| bool | extend (int64_t unit, int64_t max_length, bool top_open=true) noexcept |
| |
|
bool | set_muted (int k, bool m) noexcept |
| | Mutes or unmutes pass k, k being heard.
|
| |
|
void | clear () noexcept |
| |
|
Pass & | begin_first_pass () noexcept |
| | Forgets every pass for a recording: its pass, the first one.
|
| |
|
Pass & | push_pass () noexcept |
| | Adds a pass over the ones heard, room having been made for it.
|
| |
| void | drop_redo () noexcept |
| |
|
void | forget_aside () noexcept |
| | Forgets the layer set aside.
|
| |
|
void | drop_unmerge () noexcept |
| | Undo is not to take the last merge apart: what it kept for that goes.
|
| |
| void | set_aside (int k) noexcept |
| |
|
int | returns_on_undo () const noexcept |
| | Undoing the top pass puts back the layer it replaced: where it goes.
|
| |
| int | leaves_on_redo () const noexcept |
| |
| void | put_back () noexcept |
| |
|
bool | undo () noexcept |
| |
|
bool | redo () noexcept |
| |
| bool | erase (int k) noexcept |
| |
|
void | begin_merge () noexcept |
| | A merge is about to be worked out: what it would make stale goes.
|
| |
| void | merged (int at, const Pass &merged, bool undoable, const Pass &a, const Pass &b) noexcept |
| |
| Pass | merged_pass (const Pass &a, const Pass &b) const noexcept |
| |
| bool | replaced (uint64_t by, int self_pass, bool taking) const noexcept |
| |