|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|

Public Types | |
| using | NoteLength = utils::NoteLength |
| using | NoteType = utils::NoteType |
Public Member Functions | |
| QuantizeOptions (NoteLength note_length) | |
| void | init (NoteLength note_length) |
| void | update_quantize_points (const zrythm::dsp::Transport &transport) |
| Updates snap points. | |
| float | get_swing () const |
| float | get_amount () const |
| float | get_randomization () const |
| void | set_swing (float swing) |
| void | set_amount (float amount) |
| void | set_randomization (float randomization) |
| std::pair< units::precise_tick_t, double > | quantize_position (units::precise_tick_t pos) |
| Quantizes the given Position using the given QuantizeOptions. | |
Static Public Member Functions | |
| static utils::Utf8String | to_string (NoteLength note_length, NoteType note_type) |
| Returns the grid intensity as a human-readable string. | |
Data Fields | |
| std::vector< units::precise_tick_t > | q_points_ |
| Quantize points. | |
| NoteLength | note_length_ {} |
| See SnapGrid. | |
| NoteType | note_type_ {} |
| See SnapGrid. | |
| float | amount_ = 100.f |
| Percentage to apply quantize (0-100). | |
| bool | adjust_start_ = true |
| Adjust start position or not (only applies to objects with length. | |
| bool | adjust_end_ = false |
| Adjust end position or not (only applies to objects with length. | |
| float | swing_ = 0.f |
| Swing amount (0-100). | |
| double | randomization_ticks_ = 0.f |
| Number of ticks for randomization. | |
| PCGRand | rand_ |
Static Public Attributes | |
| static constexpr auto | MAX_SNAP_POINTS = 120096 |
Friends | |
| void | to_json (nlohmann::json &j, const QuantizeOptions &p) |
| void | from_json (const nlohmann::json &j, QuantizeOptions &p) |
Definition at line 25 of file quantize_options.h.
| using zrythm::gui::old_dsp::QuantizeOptions::NoteLength = utils::NoteLength |
Definition at line 29 of file quantize_options.h.
Definition at line 30 of file quantize_options.h.
|
inline |
Definition at line 34 of file quantize_options.h.
| std::pair< units::precise_tick_t, double > zrythm::gui::old_dsp::QuantizeOptions::quantize_position | ( | units::precise_tick_t | pos | ) |
Quantizes the given Position using the given QuantizeOptions.
This assumes that the start/end check has been done already and it ignores the adjust_start and adjust_end options.
|
friend |
Definition at line 95 of file quantize_options.h.
|
friend |
Definition at line 83 of file quantize_options.h.
| bool zrythm::gui::old_dsp::QuantizeOptions::adjust_end_ = false |
Adjust end position or not (only applies to objects with length.
Definition at line 133 of file quantize_options.h.
| bool zrythm::gui::old_dsp::QuantizeOptions::adjust_start_ = true |
Adjust start position or not (only applies to objects with length.
Definition at line 130 of file quantize_options.h.
| float zrythm::gui::old_dsp::QuantizeOptions::amount_ = 100.f |
Percentage to apply quantize (0-100).
Definition at line 127 of file quantize_options.h.
|
staticconstexpr |
Definition at line 28 of file quantize_options.h.
| NoteLength zrythm::gui::old_dsp::QuantizeOptions::note_length_ {} |
See SnapGrid.
Definition at line 121 of file quantize_options.h.
| NoteType zrythm::gui::old_dsp::QuantizeOptions::note_type_ {} |
See SnapGrid.
Definition at line 124 of file quantize_options.h.
| std::vector<units::precise_tick_t> zrythm::gui::old_dsp::QuantizeOptions::q_points_ |
Quantize points.
These only take into account note_length, note_type and swing. They don't take into account the amount % or randomization ticks.
Not to be serialized.
Definition at line 118 of file quantize_options.h.
| PCGRand zrythm::gui::old_dsp::QuantizeOptions::rand_ |
Definition at line 141 of file quantize_options.h.
| double zrythm::gui::old_dsp::QuantizeOptions::randomization_ticks_ = 0.f |
Number of ticks for randomization.
Definition at line 139 of file quantize_options.h.
| float zrythm::gui::old_dsp::QuantizeOptions::swing_ = 0.f |
Swing amount (0-100).
Definition at line 136 of file quantize_options.h.