Previously,
0 -> no swing (1:1, 50%)
50 -> triplet swing (2:1, 66%)
75 -> hard swing (3:1, 75%)
100 -> sextuplet swing (5:1, 83%) (default!)
150 -> absolute maximum (inf:1, 100%)
This is rather confusing...
One common interpretation uses percentages of the beat, where triplet
swing is 66%. However, that causes precision issues since it's really
66.666...
Since we already default to 100 and take "no swing" as zero, let's make
that reference point triplet swing. Then the scale becomes:
0 -> no swing (1:1)
100 -> triplet swing (2:1)
150 -> hard swing (3:1)
200 -> sextuplet swing (5:1)
300 -> absolute maximum (inf:1)
300 doesn't make any sense, so let's change the range to -250 .. 250
which covers all useful values.
Also remove the division through 100 and back, to avoid rounding issues.
Signed-off-by: Asahi Lina <lina@asahilina.net>
- Fix selection of what beats to swing (was always done)
- Fix swing strength (lack of precision rounded to 50% or 100%)
- Fix model offset not being applied properly
Signed-off-by: Asahi Lina <lina@asahilina.net>
This also adds interaction with sections in the
Arrangement Ruler.
Note that selecting a range switches to the Range tool.
This is enforced because time-range selection is only meaningful
with tools that perform edit operations on the whole timeline.
When drawing the outline of a rectangle, the bounding
box must cover the whole pixel of the line. Otherwise
the line would be left behind when the rectangle shrinks.
The read_index is adjusted in the loop, which means that the calculation of how much
data can be delivered to the stretcher must also be inside the loop
Create a marker by ctrl-click, hover over it and then ctrl+z
undo. This used to crash in Editor::get_preferred_edit_position()
gtk2_ardour/editor.cc:5179, checking for entered_marker->position()