[Ardour-Dev] sort_ports_by_name patch

Pau Arumí parumi at iua.upf.edu
Mon May 4 07:27:24 PDT 2009


Hi, 

I was about to transform this bug-report-and-patch from Natanael to a
mantis bug (in hopes that it would receive attention and eventually a
commit). But then I found bug #1795 "Sort Connections", resolved because
"we've got a new connections manager".

Since it seems that commenting on closed bugs in mantis is not possible
(tell me otherwise) I'll ask here: does this new connections manager
refers to ardour3 ? If so, is it wise to switch for serious work
(without midi)? 

Thanks
P 

El dl 20 de 04 de 2009 a les 22:07 +0200, en/na Natanael Olaiz va
escriure:
> Hi,
> 
> 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). So, if you have in the XML (we are trying to do 
> things from outside Ardour, like Pau comment some days ago...) a 15 
> channels track connected to a bus 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">
> 
> You obtain in the GUI the order: 1,4,5,10,11,12,13,14,15,2,3 (like in 
> the screenshot), because of a double alphabetically order... (2 became 
> 10, and 10 at their time is 4...).
> 
> So I made a patch to make the sort routine check for numbers to the end 
> of the port name. Is attached, and a test session with those connections.
> 
> I have to change the cstdlib atoi for the PBD one, and try to use 
> ustrings instead std::strings... but the reverse iterator doesn't work. 
> Anyway, it works.
> 
> 
> Best regards,
> Natanael.
> _______________________________________________
> ardour-dev mailing list
> ardour-dev at lists.ardour.org
> http://lists.ardour.org/listinfo.cgi/ardour-dev-ardour.org




More information about the Ardour-Dev mailing list