#pragma once // bake_hold — how one radial knob addresses the note-length ladder: the Hold control's // normalized [0,1] position mapped onto a Division and back. The ladder and its picker order // are musical_division's; nothing about them is restated here. #include "core/instrument/note/musical_division.h" namespace reasampler::instrument::ui { // [0,1] across the ladder in picker order (shortest rung first). Out-of-range or non-finite // input clamps to an end rather than wrapping — a knob cannot express anything else. note::Division bakeHoldFromNorm(double norm); // The inverse: the position that reproduces `hold` exactly, so a knob painted from a stored // value and then released without moving cannot shift it a rung. double bakeHoldNorm(note::Division hold); } // namespace reasampler::instrument::ui