2#include <Process/TimeValue.hpp>
3#include <Process/ZoomHelper.hpp>
5#include <ossia/editor/scenario/time_signature.hpp>
7#include <Patternist/PatternModel.hpp>
9#include <score_plugin_midi_export.h>
27 std::vector<std::pair<TimeVal, ossia::time_signature>>
signatures;
29 bool operator==(
const TimeGrid&)
const noexcept =
default;
55SCORE_PLUGIN_MIDI_EXPORT
56std::vector<StepSlot> timelineSlots(
57 int length,
int division,
const TimeGrid& grid, ZoomRatio zoom,
double width,
58 std::size_t maxSlots = 100000);
60inline std::vector<StepSlot> timelineSlots(
61 const Pattern& p,
const TimeGrid& grid, ZoomRatio zoom,
double width,
62 std::size_t maxSlots = 100000)
64 return timelineSlots(p.length, p.division, grid, zoom, width, maxSlots);
68SCORE_PLUGIN_MIDI_EXPORT
69ossia::time_signature signatureAt(
const TimeGrid& grid,
TimeVal date)
noexcept;
73SCORE_PLUGIN_MIDI_EXPORT
75fitSlots(
const Pattern& p, ossia::time_signature sig,
double x0,
double x1);
78SCORE_PLUGIN_MIDI_EXPORT
double longestLoop(
const Pattern& p)
noexcept;
83SCORE_PLUGIN_MIDI_EXPORT
84std::vector<StepSlot> fitLaneSlots(
85 int length,
int division, ossia::time_signature sig,
double span,
double x0,
91 std::vector<std::vector<StepSlot>> lanes;
98SCORE_PLUGIN_MIDI_EXPORT
100 const Pattern& p, ossia::time_signature sig,
double x0,
double x1,
double minStep);
105SCORE_PLUGIN_MIDI_EXPORT
107 const std::vector<StepSlot>& slots, int64_t played,
int length,
int division,
108 double span)
noexcept;
111SCORE_PLUGIN_MIDI_EXPORT
112int slotWithIndex(
const std::vector<StepSlot>& slots, int64_t index)
noexcept;
Every lane of a pattern over [x0; x1[.
Definition PatternGrid.hpp:90
double span
Quarters across the width when the lanes line up, 0 otherwise.
Definition PatternGrid.hpp:93
One step as it falls on the timeline.
Definition PatternGrid.hpp:34
int64_t index
Definition PatternGrid.hpp:46
bool repeat
Past the first pass through the pattern, or before the process starts.
Definition PatternGrid.hpp:39
int shade
Definition PatternGrid.hpp:49
int beat
Index of the beat the step falls in, counted from its bar line.
Definition PatternGrid.hpp:43
Definition PatternGrid.hpp:20
TimeVal playStart
Definition PatternGrid.hpp:25
TimeVal origin
Date of the layer's left edge.
Definition PatternGrid.hpp:22
std::vector< std::pair< TimeVal, ossia::time_signature > > signatures
Sorted by date. Empty, or before the first entry, is 4/4 from 0.
Definition PatternGrid.hpp:27
Definition TimeValue.hpp:21