Loading...
Searching...
No Matches
Patternist::Controller Class Referencefinal
Inheritance diagram for Patternist::Controller:

Detailed Description

Turns edits of the current pattern into commands. Shared by the layer, the node and the editor window.

Public Member Functions

 Controller (const ProcessModel &model, const score::DocumentContext &ctx, QObject *parent)
 
void attach (View &view)
 Edits made in the view become commands.
 
void fillMenu (QMenu &menu, int lane)
 Pattern actions, and those of lane when it is valid.
 
void copy () const
 
void paste ()
 
void copySteps (const StepSelection &s) const
 Copies steps, to paste at another place.
 
bool pasteSteps (int lane, const std::vector< int > &starts)
 
void clearSteps (const StepSelection &s)
 
void clear ()
 
void rotate (int steps)
 
void transpose (int semitones)
 Every lane's note, by semitones.
 
void randomize (int lane=-1)
 One lane, or every lane when lane is -1.
 
void toggleMute (int lane)
 
void toggleSolo (int lane)
 
void copyLanes (const std::vector< int > &lanes) const
 
bool pasteLanes (const std::vector< int > &targets)
 
void clearLanes (const std::vector< int > &lanes)
 
void addLane ()
 
void addControlLane (uint8_t note)
 
void removeLane (int lane)
 
void setLength (int length)
 
void setDivision (int division)
 
template<typename F >
void editLane (int lane, F &&f)
 One-shot edits of a lane, as one undo step.
 
void euclidean (int lane, int hits, int rotation, Combine c)
 Writes a Euclidean rhythm into the lane.
 
void randomizeField (StepField f, int lane)
 One parameter of the steps of lane, or of every lane when it is -1.
 
void resetField (StepField f, int lane)
 
void setCondition (int lane, int step, Condition c, int a, int b)
 
void selectPattern (int index)
 
void duplicatePattern ()
 
void removePattern ()
 

Public Attributes

std::function< void(const QString &)> status
 What the last action did, for the editor to show.
 

Member Function Documentation

◆ pasteSteps()

bool Patternist::Controller::pasteSteps ( int  lane,
const std::vector< int > &  starts 
)

Pastes copied steps from lane on, each lane from its step in starts. False when the clipboard holds no steps.


The documentation for this class was generated from the following files: