View Issue Details

IDProjectCategoryView StatusLast Update
0004699ardourbugspublic2015-09-18 15:19
Reportercolinf Assigned Tocth103  
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Target Version3.0 
Summary0004699: Polarity-invert buttons in >3 channel tracks are confusing.
DescriptionI don't know if this is an actual bug, but if it is working in the way it's supposed to, it confuses me.

My first expectation was that left-clicking the polarity-invert button in a multi-channel track would invert all channels. However, it appears that it only inverts the first one: I suppose that's not unreasonable either, but it only does this if no other channels are already inverted from the right-click menu. If any other channels are already inverted, left-clicking it un-inverts the first channel if it is also inverted, but otherwise does nothing.

Is this how it's supposed to work? If so, please consider this a feature request to change it to something a bit more straightforward.
TagsNo tags attached.

Activities

colinf

2012-02-09 16:19

updater   ~0012771

I've played a bit more with this now.

I tried changing it so that left-click on the invert button in a track with more than three channels toggles the polarity of all channels (patch polarity-button-toggles-all-channels.patch to follow shortly: also fixes incorrect tooltip for invert button in 4-channel tracks).

That feels better to me than before, but it's still not perfect. If no channels are inverted, clicking the button inverts all of them, the button lights up, and clicking it again un-inverts them all and the button goes dark, which is (I think) as it should be.

However, if you right-click and individually invert some (but not all) channels, the button lights up, and remains lit on left clicking, so there's no visual feedback that you've actually toggled the inverted state of all channels.

What should happen? Could this be a case for the 'bordered' style of buttons to indicate 'some channels inverted, but not all'? Should left-click of the button turn all inversions off if any are on? Should it always pop up a menu? Or something else?

2012-02-09 16:19

 

polarity-button-toggles-all-channels.patch (1,631 bytes)   
Index: gtk2_ardour/route_ui.cc
===================================================================
--- gtk2_ardour/route_ui.cc	(revision 11476)
+++ gtk2_ardour/route_ui.cc	(working copy)
@@ -1771,10 +1771,10 @@
 			b->set_text (string_compose (X_("Ø%1"), i + 1));
 		}
 
-		if (N <= 4) {
+		if (N <= _max_invert_buttons) {
 			UI::instance()->set_tip (*b, string_compose (_("Left-click to invert (phase reverse) channel %1 of this track.  Right-click to show menu."), i + 1));
 		} else {
-			UI::instance()->set_tip (*b, string_compose (_("Left-click to invert (phase reverse) all channels of this track.  Right-click to show menu."), i + 1));
+			UI::instance()->set_tip (*b, _("Left-click to invert (phase reverse) all channels of this track.  Right-click to show menu."));
 		}
 
 		_invert_buttons.push_back (b);
@@ -1808,8 +1808,23 @@
 bool
 RouteUI::invert_release (GdkEventButton* ev, uint32_t i)
 {
-	if (ev->button == 1 && i < _invert_buttons.size()) {
-		_route->set_phase_invert (i, !_invert_buttons[i]->get_active());
+	size_t nbuttons = _invert_buttons.size();
+
+	cerr << "invert_release(ev, " << i << "), nbuttons=" << nbuttons << endl;
+	if (ev->button == 1 && i < nbuttons) {
+
+		if (nbuttons > 1) {
+			// multiple invert buttons, just invert the one that was clicked
+			_route->set_phase_invert (i, !_invert_buttons[i]->get_active());
+		} else {
+			// a single button: invert all channels?
+			uint32_t const N = _route->input()->n_ports().n_audio();
+			for (uint32_t j = 0; j != N; ++j) {
+				_route->set_phase_invert (j, !_route->phase_invert (j));
+			}
+		}
+		
+
 		return true;
 	}
 	return false;

cth103

2012-03-05 01:17

administrator   ~0012852

SVN 11593 contains a patch to use partial-lighting-up of the invert button if only a subset of channels are selected, and always offers a menu if there are more channels than invert buttons. Let me know if you see any problems with that.

colinf

2012-03-05 19:14

updater   ~0012858

Yes, that's better. The only thing that still seems a bit odd to me is that polarity invert buttons in mono tracks and >3-channel tracks look exactly alike, but behave differently when left-clicked.

Maybe just changing the caption of the button in >3-channel tracks would be enough? Perhaps something like "Ø (4)" (or however many channels)?

cth103

2012-03-05 22:06

administrator   ~0012865

Nice idea, done in SVN 11598.

colinf

2015-09-18 15:19

updater   ~0017292

Closing old issues reported by me: these have long since been fixed.

Issue History

Date Modified Username Field Change
2012-02-08 18:46 colinf New Issue
2012-02-09 16:19 colinf Note Added: 0012771
2012-02-09 16:19 colinf File Added: polarity-button-toggles-all-channels.patch
2012-02-09 20:22 cth103 cost => 0.00
2012-02-09 20:22 cth103 Target Version => 3.0-beta3
2012-02-14 17:20 paul Target Version 3.0-beta3 => 3.0 beta4
2012-03-05 01:17 cth103 Note Added: 0012852
2012-03-05 01:17 cth103 Status new => resolved
2012-03-05 01:17 cth103 Resolution open => fixed
2012-03-05 01:17 cth103 Assigned To => cth103
2012-03-05 19:14 colinf Note Added: 0012858
2012-03-05 22:06 cth103 Note Added: 0012865
2012-05-23 15:09 cth103 Target Version 3.0 beta4 => 3.0
2015-09-18 15:19 colinf Note Added: 0017292
2015-09-18 15:19 colinf Status resolved => closed