Loading...
Searching...
No Matches
Inheritance diagram for Nodes::Looper::midi_loop:
Nodes::Looper::tagged_pass_stack< midi_loop, midi_pass, 32 > Nodes::Looper::pass_stack< Store, Pass, MaxLayers >

Detailed Description

The notes and controllers of a MIDI loop, in fixed storage.

The passes are a pass_stack; every event is tagged with the pass that recorded it: undoing a pass hides its events, redoing shows them again, erasing it removes them. Controllers of a pass replace the same controller of earlier passes where the pass went, so two curves of one controller never fight; notes do as well with OverdubMode::Replace. Each event keeps every pass that replaces it, and is heard when none of them is: muting, erasing or merging a pass leaves what the others replace as it is.

Public Member Functions

void clear_material () noexcept
 
void pass_state_begun () noexcept
 
template<typename F >
void for_each_material (F &&f) noexcept
 
template<typename F >
void remove_material (F &&gone) noexcept
 
bool touched (uint16_t key) const noexcept
 
bool heard (const midi_note &n, OverdubMode mode, bool own_mute=true) const noexcept
 own_mute false hears a muted pass's events as if it were not muted.
 
bool heard (const midi_control &c, bool own_mute=true) const noexcept
 
template<typename F >
void remove_events (F &&gone) noexcept
 
template<typename F >
void for_each_event (F &&f) noexcept
 
void end_pass (OverdubMode mode) noexcept
 
void assign (const midi_loop &o) noexcept
 Copies what another loop holds, without its unused storage.
 
midi_note * add_note (int64_t pos, int channel, int pitch, int velocity) noexcept
 
midi_note * open_note (int channel, int pitch) noexcept
 The note-off of a held note: the oldest one of that key still open.
 
void add_control (int64_t pos, uint8_t status, uint8_t d1, uint8_t d2) noexcept
 
void touch (uint16_t key) noexcept
 The pass moves a controller it has no value of yet: it replaces it.
 
void close_open_notes (int64_t pos) noexcept
 Notes still held when the loop is left get the length they have now.
 
- Public Member Functions inherited from Nodes::Looper::tagged_pass_stack< midi_loop, midi_pass, 32 >
void passes_changed () noexcept
 
bool may_remove (int k) const noexcept
 
void muting (int) noexcept
 
void removing (int) noexcept
 
void erased (int k) noexcept
 
void aside_taken (int k) noexcept
 
void aside_returned (int k) noexcept
 
void aside_forgotten () noexcept
 
void redo_dropped (bool keep_aside) noexcept
 
void unmerge_dropped () noexcept
 
void unmerged (int at) noexcept
 
void cleared () noexcept
 
void undoing () noexcept
 
bool in_pass (int64_t k) const noexcept
 Position k is in what the pass being taken in went over.
 
bool replacing () const noexcept
 
void begin_recording () noexcept
 
void begin_overdub (int64_t start, int max=stack::max_layers, bool oldest=true, int replace=-1) noexcept
 
void merge (int at, bool undoable=false) noexcept
 
void begin_pass_state (int64_t start) noexcept
 
void advance_pass (double frames, bool backwards=false) noexcept
 
void assign_passes (const tagged_pass_stack &o) noexcept
 
int64_t distance (int64_t from, int64_t to) const noexcept
 
- Public Member Functions inherited from Nodes::Looper::pass_stack< Store, Pass, MaxLayers >
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
 

Public Attributes

std::array< midi_note, max_notes > notes {}
 
std::array< midi_control, max_controls > controls {}
 
int note_count {}
 
int control_count {}
 
bool full {}
 
std::array< bool, 128 > touched_pitches {}
 
std::array< uint16_t, max_touched > touched_keys {}
 
int touched_count {}
 
- Public Attributes inherited from Nodes::Looper::tagged_pass_stack< midi_loop, midi_pass, 32 >
uint64_t edits
 Changes each time what is heard of the loop may have changed.
 
int64_t pass_start
 
int64_t pass_written
 
double pass_progress
 
bool pass_backwards
 
bool taking
 
- Public Attributes inherited from Nodes::Looper::pass_stack< Store, Pass, MaxLayers >
std::array< Pass, max_passes+1 > layers {}
 The passes heard, then the ones redo brings back.
 
int count {}
 Passes heard.
 
int total {}
 Passes kept, the ones past count being what redo brings back.
 
int64_t length {}
 Frames in the loop.
 
uint64_t pushes {}
 
struct Nodes::Looper::pass_stack::unmerge_state unmerge
 
struct Nodes::Looper::pass_stack::aside_state aside
 
merge_log merged_passes
 

Static Public Attributes

static constexpr int max_notes = 4096
 
static constexpr int max_controls = 8192
 
static constexpr int max_touched = 64
 
- Static Public Attributes inherited from Nodes::Looper::tagged_pass_stack< midi_loop, midi_pass, 32 >
static constexpr int aside_pass
 Where the material of a pass set aside is, past every pass there can be.
 
- Static Public Attributes inherited from Nodes::Looper::pass_stack< Store, Pass, MaxLayers >
static constexpr int max_layers = MaxLayers
 Most layers kept: Max layers is at most this.
 
static constexpr int max_passes = max_layers + 1
 A pass past Max layers is one more until it is merged.
 

Additional Inherited Members

- Public Types inherited from Nodes::Looper::tagged_pass_stack< midi_loop, midi_pass, 32 >
using stack = pass_stack< midi_loop, midi_pass, MaxLayers >
 
using tags = tagged_material< stack::max_passes >
 
- Static Public Member Functions inherited from Nodes::Looper::pass_stack< Store, Pass, MaxLayers >
static int64_t period_in (const Pass &l, int64_t loop_length) noexcept
 The length a pass repeats with in a loop of loop_length frames.
 

Member Function Documentation

◆ end_pass()

void Nodes::Looper::midi_loop::end_pass ( OverdubMode  mode)
inlinenoexcept

The pass is over: what it went over is replaced where it played the same pitch, with OverdubMode::Replace, or moved the same controller.


The documentation for this struct was generated from the following file: