This is required to properly update the selection.
Previously deleting a region did not update selection
markers and other selection displays that depend on
Editor::get_selection_extents (which includes region selection).
This fixes a crash: Select a region (this sets a time-selection).
Delete the region, click on the time-selection markers (red triangles).
This fixes a crash when selecting a section, and then changing
the time-selection. Previously it was assumed that the section
context menu can only be shown for sections. But it applies to
any time[line]-selection.
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()