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

Detailed Description

The values of a loop, in passes, as a pass_stack whose material is the values and the stretches where each pass holds a key.

An impulse is fired where it was recorded, as a note: every pass is heard over the others. Any other value is held until the next one of its key: a pass holds a key from its first new value of it to its end, and, where it does, what the passes under it hold of that key is not heard. Before that first value, and after the pass, the passes under it are heard again.

The metadata of the values is in fixed storage; a value itself may own heap memory, see value_slot.

Classes

struct  touch
 

Public Member Functions

void clear_material () noexcept
 
void pass_state_begun () noexcept
 
void begin_recording () noexcept
 
template<typename F >
void for_each_material (F &&f) noexcept
 
template<typename F >
void remove_material (F &&gone) noexcept
 
template<typename F >
void remove_events (F &&gone) noexcept
 The values gone says are let go of.
 
template<typename T >
bool heard (const T &e, bool own_mute=true) const noexcept
 
int find_stretch (uint16_t key) const noexcept
 The open stretch the pass being taken in holds key over, -1 for none.
 
const touch * touched (uint16_t key) const noexcept
 
void touch_key (uint16_t key, int64_t pos, int64_t at, bool backwards) noexcept
 
void update_open_stretches () noexcept
 
void set_stretch (value_stretch &s, const touch &t, int64_t span) noexcept
 
void end_pass () noexcept
 
value_event * add_value (int64_t pos, int64_t written, uint16_t key, const ossia::value &v) noexcept
 
void write_over (int64_t lo, int64_t hi, double at) noexcept
 
void assign (const value_loop &o)
 Copies what another loop holds, without its unused storage.
 
int64_t period_for (int pass) const noexcept
 
- Public Member Functions inherited from Nodes::Looper::tagged_pass_stack< value_loop, tagged_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
 

Static Public Member Functions

static bool holds (const value_stretch &s, int64_t x, int64_t period) noexcept
 Whether a stretch holds position x, its pass repeating every period.
 
- 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.
 

Public Attributes

std::array< value_event, max_events > events {}
 
std::array< value_stretch, max_stretches > stretches {}
 
int event_count {}
 
int stretch_count {}
 
bool full {}
 
uint32_t next_serial {}
 Numbers the passes in the order they are made.
 
std::array< touch, max_touched > touches {}
 
int touch_count {}
 
uint32_t serial {}
 The serial of the pass being taken in.
 
bool whole {}
 
- Public Attributes inherited from Nodes::Looper::tagged_pass_stack< value_loop, tagged_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_events = 8192
 
static constexpr int max_stretches = 512
 
static constexpr int max_touched = 16
 
- Static Public Attributes inherited from Nodes::Looper::tagged_pass_stack< value_loop, tagged_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< value_loop, tagged_pass, 32 >
using stack = pass_stack< value_loop, tagged_pass, MaxLayers >
 
using tags = tagged_material< stack::max_passes >
 

Member Function Documentation

◆ add_value()

value_event * Nodes::Looper::value_loop::add_value ( int64_t  pos,
int64_t  written,
uint16_t  key,
const ossia::value &  v 
)
inlinenoexcept

Adds a value of the pass being taken in. A value on the frame of the last one of its key and kind in the pass takes its place.

◆ end_pass()

void Nodes::Looper::value_loop::end_pass ( )
inlinenoexcept

The pass is over: each key it holds, it holds from its first new value to where the pass ended, all round for a recording.

◆ heard()

template<typename T >
bool Nodes::Looper::value_loop::heard ( const T &  e,
bool  own_mute = true 
) const
inlinenoexcept

Heard, the pass being taken in included. own_mute false hears a muted pass's material as if it were not muted.

◆ touch_key()

void Nodes::Looper::value_loop::touch_key ( uint16_t  key,
int64_t  pos,
int64_t  at,
bool  backwards 
)
inlinenoexcept

The pass being taken in has its first new value of key at pos, at frames into it: it holds the key from there on.

◆ update_open_stretches()

void Nodes::Looper::value_loop::update_open_stretches ( )
inlinenoexcept

The stretches of the pass being taken in, as far as it will go: from the first new value of each key to where the pass started, round the loop, or all round once it went round. What it has not reached yet is held as well, since it holds it when it reaches it; the pass ending makes them as long as it went.

◆ write_over()

void Nodes::Looper::value_loop::write_over ( int64_t  lo,
int64_t  hi,
double  at 
)
inlinenoexcept

The pass being taken in went round the loop to [lo; hi[ again, at frames into it at lo: what it held there a round before is written over by what it holds now.

Member Data Documentation

◆ whole

bool Nodes::Looper::value_loop::whole {}

The pass being taken in is a recording: it holds what it has all round the loop.


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