View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0010220 | ardour | features | public | 2026-02-28 20:49 | 2026-03-01 15:50 |
| Reporter | wargreen | Assigned To | |||
| Priority | low | Severity | minor | Reproducibility | N/A |
| Status | new | Resolution | open | ||
| Platform | Debian GNU | OS | Linux | OS Version | (any) |
| Product Version | 9.2 | ||||
| Summary | 0010220: Allow to add / remove channels to track by entering number of I/O | ||||
| Description | Hi, 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" ? | ||||
| Tags | No tags attached. | ||||
|
|
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. |
|
|
This lua binding will resolve all my strange uses cases ! Thank you for this script, i will try to adapt it for some easyness :) |
|
|
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
|