Detailed Description
A value take: what is heard of a value loop, or of one of its passes, as a small JSON file, which the Automation process reads back.
{ "format": "score-value-take", "version": 1, "rate": 48000, // frames a second "frames": 96000, // the loop's length "tempo": 120, // what it was played at, and in "meter": [4, 4], "components": 1, // what an automation can play of it: the // most numbers a value has, or 0 when the // values are not all numbers, vectors and // lists of numbers, or have more than // max_components "min": [0.1], "max": [0.9], // of each component, when there are "events": [ [0, "float", 0.25], // [frame, type, value], by frame: a value [12000, "impulse"], // held until the next one, an impulse [24000, "vec3f", [1, 2, 3]], // fired on its frame [36000, "list", [["int", 1], ["string", "a"]]], [48000, "map", {"x": ["bool", true]}] ] }
The types are those of ossia: impulse, int, float, bool, string, vec2f, vec3f, vec4f, list, map; a list or a map holds [type, value] pairs. The first value holds from the loop's start when it is on frame 0, else the last one holds there, the loop going round.
Classes | |
| struct | item |
Public Member Functions | |
| void | clear () noexcept |
| void | add (int64_t pos, const value_slot &v, bool impulse) |
| int | components () const noexcept |
| std::string | to_json () const |
Static Public Member Functions | |
| static bool | is_number (const ossia::value &v) noexcept |
| static int | numbers_of (const ossia::value &v) noexcept |
| static double | number (const ossia::value &v, int component) noexcept |
Number component of a value, which it has. | |
| static void | write_number (std::string &out, double x) |
| static void | write_number (std::string &out, float x) |
| static void | write_string (std::string &out, std::string_view s) |
| static void | write_typed (std::string &out, const ossia::value &v, bool flat) |
Public Attributes | |
| std::array< item, max_items > | items {} |
| int | count {} |
| int64_t | length {} |
| double | rate {48000.} |
| double | tempo {120.} |
| int | meter_numerator {4} |
| int | meter_denominator {4} |
| std::atomic_bool | in_use {} |
Static Public Attributes | |
| static constexpr int | max_items = value_loop::max_events |
| static constexpr int | max_components = 32 |
Member Function Documentation
◆ components()
|
inlinenoexcept |
What an automation can play of the take: see the file's "components". A value with fewer numbers than others, a list, leaves the ones it does not have where they were.
◆ numbers_of()
|
inlinestaticnoexcept |
The numbers of a value an automation plays: 1 for a number, n for a vector or a list of n numbers, 0 for a list of none, -1 for anything else.
◆ write_typed()
|
inlinestatic |
"type", value: inside an event, without brackets; inside a list or a map, as a [type, value] pair.
Member Data Documentation
◆ in_use
| std::atomic_bool Nodes::Looper::value_export::in_use {} |
A job is writing it: the processing thread does not fill it until the job is over. The job may outlive the looper that made it.
◆ max_components
|
staticconstexpr |
Most numbers of a value an automation plays, each in a curve of its own.
The documentation for this struct was generated from the following file: