Loading...
Searching...
No Matches

Detailed Description

What the audio and the MIDI looper do the same way with the passes of their loop and with their transport: the tick, the buttons, undo, redo, erase, mute and the layers past Max layers, closing a take, Capture, the score stopping, the takes written and what the view is sent of them. The looper, Node, derives from looper_node<Node>, keeps its passes in a pass_stack it returns from stack(), and says what is its own:

// The passes, and what is heard of them, are about to change: the MIDI // looper ends the notes it plays. void layers_changing(); // A file is being loaded: the loop is not there yet. bool busy() const; int max_layers() const; void cleared(); // Clear emptied the loop void pass_dropped(); // the pass taken in is dropped void begin_overdub(int64_t start, bool oldest, int replaced); bool can_merge_newest() const; void merge_newest(); // the newest two, for undo bool pass_closing(); // the top pass is not closed yet void pass_closed(); // the top pass is over

// The tick: before the buttons, after Capture, after the transport ran // it, and at its end. void tick_started(const tick&); void prepare_loop(); void forget_carried(); void tick_finished(const tick&);

// Closing a take. bars: the frames of the recording's bars when they // ended it, 0 else. void looper_trim_recording(int64_t frames); void close_recording(int64_t bars); void close_overdub();

// An extending pass cut back to the loop's end: whether the top pass // starts at end or after it, the pass before it having been closed // there; what is done once such a pass is dropped; the top pass ending at // end; the playhead put pos frames into the loop. bool cut_after(int64_t end) const; void cut_pass_dropped(); void trim_top_pass(int64_t end); void head_moved(int64_t pos);

// The playhead, in the coordinates it goes forward in, how fast it goes // round in mode, whether the loop keeps to the bars rather than to the // timeline's frames, and putting it at y. double head_y(int64_t len) const; double rate_for(LoopMode mode) const; bool by_quarters() const; void set_head(double y, int64_t len);

// Capture: the count of input frames, the most it can take, making the // loop of the n frames up to end on that count, and after the loop // plays. Over a loop: whether what came in over the window makes a // layer, preparing for it, and writing it into the pass just begun. int64_t capture_clock() const; int64_t capture_limit() const; void capture_into(int64_t end, int64_t n); void captured(); bool capture_layer_ready(const capture_window& w); void capture_layer_into(const capture_window& w);

// The score stops while a pass is taken in. void stopping(); void close_on_stop(bool recording); void write_stop_take(bool recording, double date, int64_t pos);

// Takes: whether one can start, starting one of passes passes, the // work it does a tick, writing its file item, whether what it was made // of changed while it was written, its memory let go of, and the take // the score's stop leaves: written, and what its views are told of it. bool export_ready() const; void start_export(int passes, bool open, bool recording); void continue_export(); void export_item(int item); bool take_cancelled(); void take_released(); void stop_take_written(); const Looper::stop_take_notice& stop_notice() const; static constexpr const char* take_extension; // at most 7 characters bool take_placeable() const; // optional: the host can place the take halp::clip_stretch take_stretch() const; bool view_full() const; bool view_writing() const; // What the view is sent: fill_view() and what is the looper's own. void fill_message(Looper::view_message& v);

A looper may also say that an overdub pass is a layer only once something comes in for it:

static constexpr bool passes_wait_for_material = true;

Such a pass starts open but out of the stack: it is not a layer, makes no room at Max layers, drops nothing redo would bring back, and the overdub goes on over it. The looper calls material_arriving() before it records the first thing of a pass, which makes the pass a layer starting where the overdub began, as far as it went; and pass_advanced() for what the pass goes over. A pass that never gets anything is no layer, no take, no merge. A looper that does not say so makes its passes layers as they start. What Capture takes over a loop: input frames [end - n; end[ of the capture clock, as the pass an overdub over them would have been. Frame end is at y_end in the coordinates the playhead goes forward in, which it goes over rate positions a frame; backwards, they are the loop read from its end.

Public Member Functions

int64_t positions () const noexcept
 Positions of the loop the window goes over, a round at most.
 
int64_t start () const noexcept
 The first position of what it goes over, in the loop's own order.
 
int64_t position (int64_t t) const noexcept
 The loop position input frame t falls on, as an overdub records it.
 
int64_t progress (int64_t t) const noexcept
 The positions gone over from the window's start to input frame t.
 
bool contains (int64_t t) const noexcept
 

Static Public Member Functions

static int64_t wrap (int64_t k, int64_t len) noexcept
 

Public Attributes

int64_t end {}
 
int64_t n {}
 
int64_t length {}
 
double y_end {}
 
double rate {1.}
 
bool backwards {}
 

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