View Issue Details

IDProjectCategoryView StatusLast Update
0010220ardourfeaturespublic2026-03-01 15:50
Reporterwargreen Assigned To 
PrioritylowSeverityminorReproducibilityN/A
Status newResolutionopen 
PlatformDebian GNUOSLinuxOS Version(any)
Product Version9.2 
Summary0010220: Allow to add / remove channels to track by entering number of I/O
DescriptionHi,

Currently, when we want to change the number of i/o f a track, we need to open the connection windows, right click, go to add... For each channel we want to add (or remove)

It can be faster if we can direct enter the number of channel we want, as in the window for add a track.
Maybe one more item in the right-click menu, with "Enter number of channel" ?
TagsNo tags attached.

Activities

x42

2026-02-28 21:41

administrator   ~0030017

This is a bit of an odd use-case particularly since custom configurations require strict i/o to be disabled. perfect for a Lua script :)

Open Ardour Menu > Window > Scripting paste and run

<code>
-- get Editor selection:
sel = Editor:get_selection ()
-- for each selected track/bus
for route in sel.tracks:routelist ():iter () do
  print (route:name())
  io = route:output ()
  -- add 10 audio outputs
  for i = 1, 10 do
    io:add_port ("", nil, ARDOUR.DataType ("Audio"))
  end
end 
<code>


You can also specify a connection target as first argument of io:add_port or use route:input() to add input ports.

wargreen

2026-02-28 22:08

reporter   ~0030018

This lua binding will resolve all my strange uses cases !

Thank you for this script, i will try to adapt it for some easyness :)

x42

2026-03-01 14:39

administrator   ~0030022

Last edited: 2026-03-01 15:50

To remove ports:

sel = Editor:get_selection ()
for route in sel.tracks:routelist ():iter () do
  local io = route:output ()
  local have = io:n_ports():n_audio() - 1
  local want = 2
  for i = have, want do print (i)
    if not io:nth(i):isnil() do
      io:remove_port (io:nth(i), nil)
    end
  end
end

Issue History

Date Modified Username Field Change
2026-02-28 20:49 wargreen New Issue
2026-02-28 21:41 x42 Note Added: 0030017
2026-02-28 22:08 wargreen Note Added: 0030018
2026-03-01 14:39 x42 Note Added: 0030022
2026-03-01 15:50 x42 Note Edited: 0030022