View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003437 | ardour | other | public | 2010-09-04 19:14 | 2020-04-19 20:14 |
| Reporter | lincoln | Assigned To | cth103 | ||
| Priority | normal | Severity | tweak | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Target Version | 3.0-beta1 | ||||
| Summary | 0003437: [PATCH] Audio Region Fade visual tweaks | ||||
| Description | The attached patch gives region fades some attention to make them look ok again. | ||||
| Tags | No tags attached. | ||||
|
2010-09-04 19:14
|
audio-region-visual-tweaks.patch (3,673 bytes)
Index: gtk2_ardour/audio_region_view.cc
===================================================================
--- gtk2_ardour/audio_region_view.cc (revision 7741)
+++ gtk2_ardour/audio_region_view.cc (working copy)
@@ -329,11 +329,11 @@
if (audio_region()->fade_in_active()) {
fade_in_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,90); // FIXME make a themeable colour
fade_in_shape->property_width_pixels() = 1;
- fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,190); // FIXME make a themeable colour
+// fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,190); // FIXME make a themeable colour
} else {
fade_in_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,20); // FIXME make a themeable colour
fade_in_shape->property_width_pixels() = 1;
- fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,150); // FIXME make a themeable colour
+// fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,150); // FIXME make a themeable colour
}
}
@@ -347,11 +347,13 @@
if (audio_region()->fade_out_active()) {
fade_out_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,90); // FIXME make a themeable colour
fade_out_shape->property_width_pixels() = 1;
- fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,200); // FIXME make a themeable colour
+ //fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,200); // FIXME make a themeable colour
+
} else {
fade_out_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,20); // FIXME make a themeable colour
fade_out_shape->property_width_pixels() = 1;
- fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,200); // FIXME make a themeable colour
+ //fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,200); // FIXME make a themeable colour
+
}
}
@@ -436,19 +438,9 @@
}
if (fade_in_handle) {
- if (pixel_width <= 6.0) {
+ if (pixel_width <= 6.0 || _height < 5.0 || !trackview.session()->config.get_show_region_fades()) {
fade_in_handle->hide();
fade_out_handle->hide();
- } else {
- if (_height < 5.0) {
- fade_in_handle->hide();
- fade_out_handle->hide();
- } else {
- if (trackview.session()->config.get_show_region_fades()) {
- fade_in_handle->show();
- fade_out_handle->show();
- }
- }
}
}
@@ -589,6 +581,7 @@
width = std::max ((nframes_t) 64, width);
Points* points;
+
double pwidth = width / samples_per_unit;
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
double h;
@@ -626,7 +619,7 @@
points = get_canvas_points ("fade in shape", npoints + 3);
if (_height >= NAME_HIGHLIGHT_THRESH) {
- h = _height - NAME_HIGHLIGHT_SIZE;
+ h = _height - NAME_HIGHLIGHT_SIZE - 2;
} else {
h = _height;
}
@@ -694,7 +687,7 @@
handle_center = (_region->length() - width) / samples_per_unit;
if (handle_center > 7.0) {
- handle_center -= 3.0;
+ handle_center += 3.0;
} else {
handle_center = 3.0;
}
@@ -717,7 +710,7 @@
audio_region()->fade_out()->curve().get_vector (0, audio_region()->fade_out()->back()->when, curve, npoints);
if (_height >= NAME_HIGHLIGHT_THRESH) {
- h = _height - NAME_HIGHLIGHT_SIZE;
+ h = _height - NAME_HIGHLIGHT_SIZE - 2;
} else {
h = _height;
}
@@ -730,7 +723,7 @@
double xdelta = pwidth/npoints;
for (pi = 0, pc = 0; pc < npoints; ++pc) {
- (*points)[pi].set_x(_pixel_width - 1 - pwidth + (pc*xdelta));
+ (*points)[pi].set_x(_pixel_width - pwidth + (pc * xdelta));
(*points)[pi++].set_y(2 + (h - (curve[pc] * h)));
}
|
|
2010-09-04 19:17
|
audio-region-visual-tweaks-2.patch (3,815 bytes)
Index: gtk2_ardour/audio_region_view.cc
===================================================================
--- gtk2_ardour/audio_region_view.cc (revision 7741)
+++ gtk2_ardour/audio_region_view.cc (working copy)
@@ -329,11 +329,11 @@
if (audio_region()->fade_in_active()) {
fade_in_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,90); // FIXME make a themeable colour
fade_in_shape->property_width_pixels() = 1;
- fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,190); // FIXME make a themeable colour
+// fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,190); // FIXME make a themeable colour
} else {
fade_in_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,20); // FIXME make a themeable colour
fade_in_shape->property_width_pixels() = 1;
- fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,150); // FIXME make a themeable colour
+// fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,150); // FIXME make a themeable colour
}
}
@@ -347,11 +347,13 @@
if (audio_region()->fade_out_active()) {
fade_out_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,90); // FIXME make a themeable colour
fade_out_shape->property_width_pixels() = 1;
- fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,200); // FIXME make a themeable colour
+ //fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,200); // FIXME make a themeable colour
+
} else {
fade_out_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,20); // FIXME make a themeable colour
fade_out_shape->property_width_pixels() = 1;
- fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,200); // FIXME make a themeable colour
+ //fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,200); // FIXME make a themeable colour
+
}
}
@@ -436,20 +438,14 @@
}
if (fade_in_handle) {
- if (pixel_width <= 6.0) {
+ if (pixel_width <= 6.0 || _height < 5.0 || !trackview.session()->config.get_show_region_fades()) {
fade_in_handle->hide();
fade_out_handle->hide();
- } else {
- if (_height < 5.0) {
- fade_in_handle->hide();
- fade_out_handle->hide();
- } else {
- if (trackview.session()->config.get_show_region_fades()) {
- fade_in_handle->show();
- fade_out_handle->show();
- }
- }
}
+ else {
+ fade_in_handle->hide();
+ fade_out_handle->hide();
+ }
}
AnalysisFeatureList analysis_features = _region->transients();
@@ -589,6 +585,7 @@
width = std::max ((nframes_t) 64, width);
Points* points;
+
double pwidth = width / samples_per_unit;
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
double h;
@@ -626,7 +623,7 @@
points = get_canvas_points ("fade in shape", npoints + 3);
if (_height >= NAME_HIGHLIGHT_THRESH) {
- h = _height - NAME_HIGHLIGHT_SIZE;
+ h = _height - NAME_HIGHLIGHT_SIZE - 2;
} else {
h = _height;
}
@@ -694,7 +691,7 @@
handle_center = (_region->length() - width) / samples_per_unit;
if (handle_center > 7.0) {
- handle_center -= 3.0;
+ handle_center += 3.0;
} else {
handle_center = 3.0;
}
@@ -717,7 +714,7 @@
audio_region()->fade_out()->curve().get_vector (0, audio_region()->fade_out()->back()->when, curve, npoints);
if (_height >= NAME_HIGHLIGHT_THRESH) {
- h = _height - NAME_HIGHLIGHT_SIZE;
+ h = _height - NAME_HIGHLIGHT_SIZE - 2;
} else {
h = _height;
}
@@ -730,7 +727,7 @@
double xdelta = pwidth/npoints;
for (pi = 0, pc = 0; pc < npoints; ++pc) {
- (*points)[pi].set_x(_pixel_width - 1 - pwidth + (pc*xdelta));
+ (*points)[pi].set_x(_pixel_width - pwidth + (pc * xdelta));
(*points)[pi++].set_y(2 + (h - (curve[pc] * h)));
}
|
|
|
Please use second version. |
|
|
Any chance of a screenshot to see the changes ? |
|
2010-09-04 20:40
|
audio-region-visual-tweaks-3.patch (3,815 bytes)
Index: gtk2_ardour/audio_region_view.cc
===================================================================
--- gtk2_ardour/audio_region_view.cc (revision 7741)
+++ gtk2_ardour/audio_region_view.cc (working copy)
@@ -329,11 +329,11 @@
if (audio_region()->fade_in_active()) {
fade_in_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,90); // FIXME make a themeable colour
fade_in_shape->property_width_pixels() = 1;
- fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,190); // FIXME make a themeable colour
+// fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,190); // FIXME make a themeable colour
} else {
fade_in_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,20); // FIXME make a themeable colour
fade_in_shape->property_width_pixels() = 1;
- fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,150); // FIXME make a themeable colour
+// fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,150); // FIXME make a themeable colour
}
}
@@ -347,11 +347,13 @@
if (audio_region()->fade_out_active()) {
fade_out_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,90); // FIXME make a themeable colour
fade_out_shape->property_width_pixels() = 1;
- fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,200); // FIXME make a themeable colour
+ //fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,200); // FIXME make a themeable colour
+
} else {
fade_out_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,20); // FIXME make a themeable colour
fade_out_shape->property_width_pixels() = 1;
- fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,200); // FIXME make a themeable colour
+ //fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,200); // FIXME make a themeable colour
+
}
}
@@ -436,20 +438,14 @@
}
if (fade_in_handle) {
- if (pixel_width <= 6.0) {
+ if (pixel_width <= 6.0 || _height < 5.0 || !trackview.session()->config.get_show_region_fades()) {
fade_in_handle->hide();
fade_out_handle->hide();
- } else {
- if (_height < 5.0) {
- fade_in_handle->hide();
- fade_out_handle->hide();
- } else {
- if (trackview.session()->config.get_show_region_fades()) {
- fade_in_handle->show();
- fade_out_handle->show();
- }
- }
}
+ else {
+ fade_in_handle->show();
+ fade_out_handle->show();
+ }
}
AnalysisFeatureList analysis_features = _region->transients();
@@ -589,6 +585,7 @@
width = std::max ((nframes_t) 64, width);
Points* points;
+
double pwidth = width / samples_per_unit;
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
double h;
@@ -626,7 +623,7 @@
points = get_canvas_points ("fade in shape", npoints + 3);
if (_height >= NAME_HIGHLIGHT_THRESH) {
- h = _height - NAME_HIGHLIGHT_SIZE;
+ h = _height - NAME_HIGHLIGHT_SIZE - 2;
} else {
h = _height;
}
@@ -694,7 +691,7 @@
handle_center = (_region->length() - width) / samples_per_unit;
if (handle_center > 7.0) {
- handle_center -= 3.0;
+ handle_center += 3.0;
} else {
handle_center = 3.0;
}
@@ -717,7 +714,7 @@
audio_region()->fade_out()->curve().get_vector (0, audio_region()->fade_out()->back()->when, curve, npoints);
if (_height >= NAME_HIGHLIGHT_THRESH) {
- h = _height - NAME_HIGHLIGHT_SIZE;
+ h = _height - NAME_HIGHLIGHT_SIZE - 2;
} else {
h = _height;
}
@@ -730,7 +727,7 @@
double xdelta = pwidth/npoints;
for (pi = 0, pc = 0; pc < npoints; ++pc) {
- (*points)[pi].set_x(_pixel_width - 1 - pwidth + (pc*xdelta));
+ (*points)[pi].set_x(_pixel_width - pwidth + (pc * xdelta));
(*points)[pi++].set_y(2 + (h - (curve[pc] * h)));
}
|
|
2010-09-04 20:41
|
|
|
|
Added updated patch (stupid copy-paste error) and screen shot. |
|
2010-09-05 01:38
|
region-fade-line.patch (10,576 bytes)
Index: gtk2_ardour/editor_drag.cc
===================================================================
--- gtk2_ardour/editor_drag.cc (revision 7741)
+++ gtk2_ardour/editor_drag.cc (working copy)
@@ -2265,12 +2265,13 @@
{
Drag::start_grab (event, cursor);
- AudioRegionView* a = dynamic_cast<AudioRegionView*> (_primary);
- boost::shared_ptr<AudioRegion> const r = a->audio_region ();
+ AudioRegionView* arv = dynamic_cast<AudioRegionView*> (_primary);
+ boost::shared_ptr<AudioRegion> const r = arv->audio_region ();
_pointer_frame_offset = grab_frame() - ((nframes64_t) r->fade_in()->back()->when + r->position());
_editor->show_verbose_duration_cursor (r->position(), r->position() + r->fade_in()->back()->when, 10);
+ arv->show_fade_line((nframes64_t) r->fade_in()->back()->when);
}
void
@@ -2299,6 +2300,7 @@
}
tmp->reset_fade_in_shape_width (fade_length);
+ tmp->show_fade_line((nframes64_t) fade_length);
}
_editor->show_verbose_duration_cursor (region->position(), region->position() + fade_length, 10);
@@ -2340,6 +2342,7 @@
tmp->audio_region()->set_fade_in_length (fade_length);
tmp->audio_region()->set_fade_in_active (true);
+ tmp->hide_fade_line();
XMLNode &after = alist->get_state();
_editor->session()->add_command(new MementoCommand<AutomationList>(*alist.get(), &before, &after));
@@ -2359,6 +2362,7 @@
}
tmp->reset_fade_in_shape_width (tmp->audio_region()->fade_in()->back()->when);
+ tmp->hide_fade_line();
}
}
@@ -2373,11 +2377,13 @@
{
Drag::start_grab (event, cursor);
- AudioRegionView* a = dynamic_cast<AudioRegionView*> (_primary);
- boost::shared_ptr<AudioRegion> r = a->audio_region ();
+ AudioRegionView* arv = dynamic_cast<AudioRegionView*> (_primary);
+ boost::shared_ptr<AudioRegion> r = arv->audio_region ();
_pointer_frame_offset = grab_frame() - (r->length() - (nframes64_t) r->fade_out()->back()->when + r->position());
_editor->show_verbose_duration_cursor (r->last_frame() - r->fade_out()->back()->when, r->last_frame(), 10);
+
+ arv->show_fade_line(r->length() - r->fade_out()->back()->when);
}
void
@@ -2408,6 +2414,7 @@
}
tmp->reset_fade_out_shape_width (fade_length);
+ tmp->show_fade_line(region->length() - fade_length);
}
_editor->show_verbose_duration_cursor (region->last_frame() - fade_length, region->last_frame(), 10);
@@ -2451,6 +2458,7 @@
tmp->audio_region()->set_fade_out_length (fade_length);
tmp->audio_region()->set_fade_out_active (true);
+ tmp->hide_fade_line();
XMLNode &after = alist->get_state();
_editor->session()->add_command(new MementoCommand<AutomationList>(*alist.get(), &before, &after));
@@ -2470,6 +2478,7 @@
}
tmp->reset_fade_out_shape_width (tmp->audio_region()->fade_out()->back()->when);
+ tmp->hide_fade_line();
}
}
Index: gtk2_ardour/audio_region_view.h
===================================================================
--- gtk2_ardour/audio_region_view.h (revision 7741)
+++ gtk2_ardour/audio_region_view.h (working copy)
@@ -102,7 +102,10 @@
void reset_fade_in_shape_width (nframes_t);
void reset_fade_out_shape_width (nframes_t);
-
+
+ void show_fade_line(nframes64_t pos);
+ void hide_fade_line();
+
void set_fade_visibility (bool);
void update_coverage_frames (LayerDisplay);
@@ -139,6 +142,7 @@
ArdourCanvas::Polygon* fade_out_shape;
ArdourCanvas::SimpleRect* fade_in_handle; ///< fade in handle, or 0
ArdourCanvas::SimpleRect* fade_out_handle; ///< fade out handle, or 0
+ ArdourCanvas::SimpleLine* fade_position_line;
AudioRegionGainLine * gain_line;
@@ -158,7 +162,7 @@
void region_resized (const PBD::PropertyChange&);
void region_muted ();
void region_scale_amplitude_changed ();
- void region_renamed ();
+ void region_renamed ();
void create_one_wave (uint32_t, bool);
void manage_zero_line ();
Index: gtk2_ardour/editor_mouse.cc
===================================================================
--- gtk2_ardour/editor_mouse.cc (revision 7741)
+++ gtk2_ardour/editor_mouse.cc (working copy)
@@ -1633,8 +1605,7 @@
if (mouse_mode == MouseObject && !internal_editing()) {
ArdourCanvas::SimpleRect *rect = dynamic_cast<ArdourCanvas::SimpleRect *> (item);
if (rect) {
- rect->property_fill_color_rgba() = 0;
- rect->property_outline_pixels() = 1;
+ rect->property_fill_color_rgba() = 0xBBBBBBAA;
}
track_canvas->get_window()->set_cursor (*fade_in_cursor);
}
@@ -1644,8 +1615,7 @@
if (mouse_mode == MouseObject && !internal_editing()) {
ArdourCanvas::SimpleRect *rect = dynamic_cast<ArdourCanvas::SimpleRect *> (item);
if (rect) {
- rect->property_fill_color_rgba() = 0;
- rect->property_outline_pixels() = 1;
+ rect->property_fill_color_rgba() = 0xBBBBBBAA;
}
track_canvas->get_window()->set_cursor (*fade_out_cursor);
}
Index: gtk2_ardour/audio_region_view.cc
===================================================================
--- gtk2_ardour/audio_region_view.cc (revision 7741)
+++ gtk2_ardour/audio_region_view.cc (working copy)
@@ -73,6 +73,7 @@
, fade_out_shape(0)
, fade_in_handle(0)
, fade_out_handle(0)
+ , fade_position_line(0)
, gain_line(0)
, _amplitude_above_axis(1.0)
, _flags(0)
@@ -90,6 +91,7 @@
, fade_out_shape(0)
, fade_in_handle(0)
, fade_out_handle(0)
+ , fade_position_line(0)
, gain_line(0)
, _amplitude_above_axis(1.0)
, _flags(0)
@@ -106,6 +108,7 @@
, fade_out_shape(0)
, fade_in_handle(0)
, fade_out_handle(0)
+ , fade_position_line(0)
, gain_line(0)
, _amplitude_above_axis(1.0)
, _flags(0)
@@ -127,6 +130,7 @@
, fade_out_shape(0)
, fade_in_handle(0)
, fade_out_handle(0)
+ , fade_position_line(0)
, gain_line(0)
, _amplitude_above_axis(1.0)
, _flags(0)
@@ -195,6 +199,13 @@
fade_out_handle->property_outline_pixels() = 0;
fade_out_handle->set_data ("regionview", this);
+
+ fade_position_line = new ArdourCanvas::SimpleLine (*group);
+ fade_position_line->property_color_rgba() = 0xBBBBBBAA;
+ fade_position_line->property_y1() = 7;
+ fade_position_line->property_y2() = _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1;
+
+ fade_position_line->hide();
}
setup_fade_handle_positions ();
@@ -329,11 +340,11 @@
if (audio_region()->fade_in_active()) {
fade_in_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,90); // FIXME make a themeable colour
fade_in_shape->property_width_pixels() = 1;
- fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,190); // FIXME make a themeable colour
+// fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,190); // FIXME make a themeable colour
} else {
fade_in_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,20); // FIXME make a themeable colour
fade_in_shape->property_width_pixels() = 1;
- fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,150); // FIXME make a themeable colour
+// fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,150); // FIXME make a themeable colour
}
}
@@ -347,11 +358,13 @@
if (audio_region()->fade_out_active()) {
fade_out_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,90); // FIXME make a themeable colour
fade_out_shape->property_width_pixels() = 1;
- fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,200); // FIXME make a themeable colour
+ //fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(180,180,180,200); // FIXME make a themeable colour
+
} else {
fade_out_shape->property_fill_color_rgba() = RGBA_TO_UINT(45,45,45,20); // FIXME make a themeable colour
fade_out_shape->property_width_pixels() = 1;
- fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,200); // FIXME make a themeable colour
+ //fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(45,45,45,200); // FIXME make a themeable colour
+
}
}
@@ -436,20 +449,14 @@
}
if (fade_in_handle) {
- if (pixel_width <= 6.0) {
+ if (pixel_width <= 6.0 || _height < 5.0 || !trackview.session()->config.get_show_region_fades()) {
fade_in_handle->hide();
fade_out_handle->hide();
- } else {
- if (_height < 5.0) {
- fade_in_handle->hide();
- fade_out_handle->hide();
- } else {
- if (trackview.session()->config.get_show_region_fades()) {
- fade_in_handle->show();
- fade_out_handle->show();
- }
- }
}
+ else {
+ fade_in_handle->show();
+ fade_out_handle->show();
+ }
}
AnalysisFeatureList analysis_features = _region->transients();
@@ -589,6 +596,7 @@
width = std::max ((nframes_t) 64, width);
Points* points;
+
double pwidth = width / samples_per_unit;
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
double h;
@@ -603,7 +611,7 @@
handle_center = pwidth;
if (handle_center > 7.0) {
- handle_center -= 3.0;
+ handle_center -= 2.0;
} else {
handle_center = 3.0;
}
@@ -626,7 +634,7 @@
points = get_canvas_points ("fade in shape", npoints + 3);
if (_height >= NAME_HIGHLIGHT_THRESH) {
- h = _height - NAME_HIGHLIGHT_SIZE;
+ h = _height - NAME_HIGHLIGHT_SIZE - 2;
} else {
h = _height;
}
@@ -694,7 +702,7 @@
handle_center = (_region->length() - width) / samples_per_unit;
if (handle_center > 7.0) {
- handle_center -= 3.0;
+ handle_center -= 2.0;
} else {
handle_center = 3.0;
}
@@ -717,7 +725,7 @@
audio_region()->fade_out()->curve().get_vector (0, audio_region()->fade_out()->back()->when, curve, npoints);
if (_height >= NAME_HIGHLIGHT_THRESH) {
- h = _height - NAME_HIGHLIGHT_SIZE;
+ h = _height - NAME_HIGHLIGHT_SIZE - 2;
} else {
h = _height;
}
@@ -730,7 +738,7 @@
double xdelta = pwidth/npoints;
for (pi = 0, pc = 0; pc < npoints; ++pc) {
- (*points)[pi].set_x(_pixel_width - 1 - pwidth + (pc*xdelta));
+ (*points)[pi].set_x(_pixel_width - pwidth + (pc * xdelta));
(*points)[pi++].set_y(2 + (h - (curve[pc] * h)));
}
@@ -1428,7 +1436,24 @@
editor->show_all();
}
+
void
+AudioRegionView::show_fade_line (nframes64_t pos)
+{
+ fade_position_line->property_x1() = trackview.editor().frame_to_pixel (pos);
+ fade_position_line->property_x2() = trackview.editor().frame_to_pixel (pos);
+ fade_position_line->show ();
+ fade_position_line->raise_to_top ();
+}
+
+void
+AudioRegionView::hide_fade_line ()
+{
+ fade_position_line->hide ();
+}
+
+
+void
AudioRegionView::transients_changed ()
{
AnalysisFeatureList analysis_features = _region->transients();
|
|
|
Added a more advance version of the patch that adds a region fade line whilst modifying a fade as requested by Oofus. |
|
|
Last patch applied to SVN. Thanks! |
|
|
Slight problem with the patch. The new fade guide line doesn't appear to resize itself if the track height has been changed. |
|
|
I noticed that too and I have a fix for this. Will attach a patch to clear this issue later on. |
|
2010-09-07 23:18
|
fade-position-line-height-adjust.patch (624 bytes)
Index: gtk2_ardour/audio_region_view.cc
===================================================================
--- gtk2_ardour/audio_region_view.cc (revision 7753)
+++ gtk2_ardour/audio_region_view.cc (working copy)
@@ -535,6 +535,15 @@
(*l).second->property_y2() = _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1;
}
+ if (fade_position_line) {
+ if (height < NAME_HIGHLIGHT_THRESH) {
+ fade_position_line->property_y2() = _height - 1;
+ }
+ else {
+ fade_position_line->property_y2() = _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1;
+ }
+ }
+
if (name_pixbuf) {
name_pixbuf->raise_to_top();
}
|
|
|
fade guide line re-size fix attached |
|
|
Fix applied to SVN. Thanks again! |
|
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-09-04 19:14 | lincoln | New Issue | |
| 2010-09-04 19:14 | lincoln | File Added: audio-region-visual-tweaks.patch | |
| 2010-09-04 19:17 | lincoln | File Added: audio-region-visual-tweaks-2.patch | |
| 2010-09-04 19:17 | lincoln | Note Added: 0008990 | |
| 2010-09-04 20:35 | oofus | Note Added: 0008991 | |
| 2010-09-04 20:40 | lincoln | File Added: audio-region-visual-tweaks-3.patch | |
| 2010-09-04 20:41 | lincoln | File Added: ardour-fades.png | |
| 2010-09-04 20:41 | lincoln | Note Added: 0008992 | |
| 2010-09-05 01:38 | lincoln | File Added: region-fade-line.patch | |
| 2010-09-05 01:39 | lincoln | Note Added: 0008993 | |
| 2010-09-05 19:23 | cth103 | cost | => 0.00 |
| 2010-09-05 19:23 | cth103 | Target Version | => 3.0-beta1 |
| 2010-09-05 19:23 | cth103 | Summary | Audio Region Fade visual tweaks => [PATCH] Audio Region Fade visual tweaks |
| 2010-09-07 11:41 | cth103 | Note Added: 0009008 | |
| 2010-09-07 11:41 | cth103 | Status | new => resolved |
| 2010-09-07 11:41 | cth103 | Resolution | open => fixed |
| 2010-09-07 11:41 | cth103 | Assigned To | => cth103 |
| 2010-09-07 12:08 | oofus | Note Added: 0009010 | |
| 2010-09-07 12:08 | oofus | Status | resolved => feedback |
| 2010-09-07 12:08 | oofus | Resolution | fixed => reopened |
| 2010-09-07 13:57 | lincoln | Note Added: 0009013 | |
| 2010-09-07 23:18 | lincoln | File Added: fade-position-line-height-adjust.patch | |
| 2010-09-07 23:19 | lincoln | Note Added: 0009015 | |
| 2010-09-07 23:30 | cth103 | Note Added: 0009016 | |
| 2010-09-07 23:30 | cth103 | Status | feedback => resolved |
| 2010-09-07 23:30 | cth103 | Resolution | reopened => fixed |
| 2020-04-19 20:14 | system | Note Added: 0022215 | |
| 2020-04-19 20:14 | system | Status | resolved => closed |