View Issue Details

IDCategoryLast Update
0002654bugs2010-04-24 10:33
ReporterparumiAssigned Tov2 
Status closedResolutionfixed 
Product VersionSVN/2.0-ongoing 
Fixed in Version2.8.2 
Summary0002654: Ports should be numerically ordered instead of alphabetically in port connections dialog
Using ardour with more than 10 in/out ports in a track, the ports order
is done alphabetically, so the order is: 1,10,11,...,2,...,9
(and figure like that in the GUI).

For example, say you have a 15 ch track with its outputs connected to a bus. The ardour session xml (for both track and bus) will look like this:

    <IO name="Audio 1" id="1105" active="yes" inputs="{}" outputs="{Bus
    1/in 1}{Bus 1/in 2}{Bus 1/in 3}{Bus 1/in 4}{Bus 1/in 5}{Bus 1/in
    6}{Bus 1/in 7}{Bus 1/in 8}{Bus 1/in 9}{Bus 1/in 10}{Bus 1/in 11}{Bus
    1/in 12}{Bus 1/in 13}{Bus 1/in 14}{Bus 1/in 15}"
    gain="1.000000000000" iolimits="1,-1,-1,-1">


    <IO name="Bus 1" id="1125" active="yes" inputs="{Audio 1/out
    1}{Audio 1/out 2}{Audio 1/out 3}{Audio 1/out 4}{Audio 1/out 5}{Audio
    1/out 6}{Audio 1/out 7}{Audio 1/out 8}{Audio 1/out 9}{Audio 1/out
    10}{Audio 1/out 11}{Audio 1/out 12}{Audio 1/out 13}{Audio 1/out
    14}{Audio 1/out 15}" outputs="{master/in 1}{master/in 2}"
    gain="1.000000000000" iolimits="-1,-1,-1,-1">

Now, if you load this session you see this amazing order in the connection dialog: 1,4,5,...,15,2,3 (see attached screenshot). This is the result of applying an alphabetically order twice (2 became 10, and 10 at their time is 4...).
Find attached the a simple session with this example.

The attached patch against rev 4992 (ardour2) changes the sort routine to check for numbers to the end of the port name.

About the implementation: We've used the cstdlib atoi (instead of the equivalent PBD function) and used std::strings instead of ustrings because we found that the ustrings reverse iterator didn't work. Maybe using std::string is probably bad for encodings?

Additional Information
We have this patch applied to many workstations in BarcelonaMedia research center audio labs, so it would be very useful for us to have the solution commited avoiding to manage patches.

This bug is related to 0001795 "Sort Connections", resolved, but only in Ardour3

Pau and Natanael
TagsNo tags attached.


2009-05-04 15:13


sort_ports.tar.gz (47,959 bytes)


2009-05-14 19:27

manager   ~0005994

the patch applies and compiles cleanly as of r5066 and fixes the reported issue for me. please apply before the graz ambisonic symposium :-D


2009-05-18 21:20

manager   ~0006013

ping! please apply.


2009-06-03 13:13

developer   ~0006050

Patch applied to 2.x, r5120

Issue History

Date Modified Username Field Change
2009-05-04 15:13 parumi New Issue
2009-05-04 15:13 parumi File Added: sort_ports.tar.gz
2009-05-14 19:27 nettings Note Added: 0005994
2009-05-18 21:20 nettings Note Added: 0006013
2009-06-03 13:13 v2 cost => 0.00
2009-06-03 13:13 v2 Note Added: 0006050
2009-06-03 13:13 v2 Status new => resolved
2009-06-03 13:13 v2 Resolution open => fixed
2009-06-03 13:13 v2 Assigned To => v2
2009-08-16 10:29 nettings Status resolved => closed
2009-08-16 10:29 nettings Fixed in Version => 2.8.2
2010-04-24 10:28 cth103 Category bugs => bugs2
2010-04-24 10:33 cth103 Category bugs2 => bugs