We have in Rack v1 tooltips for parameters now, which are great.
I like to suggest tooltips for ports. With these developers can add some information about polyphony, voltage-ranges, trigger behaviour etc. directly to the port.
Also user configuration could be done in port's context menu by adding customized menu items in the module.
Another new option would be to disconnect a specific cable on output-ports when multiple cables are connected.
This request was first mentioned here: https://github.com/VCVRack/Rack/issues/1441
It could be implemented in PortWidget probably the same way as in ParamWidget. Additionally some functions configInput and configOutput are likely to be needed to configure default properties of the ports (name, polyphony behaviour etc.).
If approved, would require ABI change.
Port name and description is fine. configInput/configOutput are fine.
Not really sure what "polyphony behavior" would mean and how it would be helpful.
Not really sure what "polyphony behavior" would mean and how it would be helpful.
"polyphony behavior" would mean how monophonic cables are handled when some other ports have polyphonic signals. E.g. "Quantum" from ML Modules allows different settings in the context menu.
@stoermelder What if the polyphony behavior metadata "lies" or is nonexistent?
In the case of nonexistent metadata on polyphony the situation is basically the same as right now: no additional information on ports for the user. This metadata should be optional, handled by Rack in the same way as parameters missing their description:

Although it might be helpful to add a default tooltip/context menu showing the number of channels in case of a polyphonic cable. Right now I use an instance of Viz for this quite often. A submenu labeled "Disconnect cable" might useful to. A quick (incomplete) implementation to show a picture of it...

"Lying" metadata I'd consider a bug that must be fixed by the plugin developer.
Proposal for port metadata struct to be added to Rack v2.
struct PortInfo {
Module* module = NULL;
// This type needs to be added to Port.
Port::Type type;
int portId;
std::string name;
std::string description;
};
Helper functions can be added to Module and called in your Module subclass.
void configInput(int portId, std::string name, std::string description)
void configOutput(int portId, std::string name, std::string description)
In Port tooltips, it would also be useful to display the current voltage (displayed if channels > 0) and the number of channels (displayed if channels > 1). The voltage would be a mess at audio rate but would at least give the user an idea of how fast the signal is moving, but CV rates would be very quick handy information. Neither of these quantities requires information from PortInfo.
Possibly a separate feature request but it would be very nice to click on a port, perhaps ALT click, and for the screen space to jump centre to that position or have the context menu option where there is multiple connections on an output (multiple connections disable ALT or go to top most connection).
stoermelder has this feature with params on his MIDI modules and a couple of others and it is extremely useful especially when you forget the patch as time might have past. Very useful for workflow.
My "Hovered Value" (https://github.com/alikins/Alikins-rack-plugins/blob/master/src/HoveredValue.cpp) includes some of the input/output port info and values
as tooltips if "Show Tooltips" is enabled from the context menu.
Nothing particularly reusable about that implementation but may be useful for seeing the utility of seeing the port voltages in practice.
馃憤 to tooltips for the ports and adding configInput()/configOutput() for providing descriptive info about the ports.
Would it be useful to add hints about suggested or intended usage of ports (ie, does it expect CV / audio / triggers / gates)? Or potentially the expected voltage range.
A potential next level to the tooltips might be to include a small scope like drawing showing the value over time. Or possible a CPU meter style bar graph.
馃
A scope displayed on a port as a popout that'll definitely stop omri deleting scopes 馃槃
Most helpful comment
Proposal for port metadata struct to be added to Rack v2.
Helper functions can be added to
Moduleand called in yourModulesubclass.