Command line arguments

For quite a long time whenever I needed to run Ardour in my debugger I used to pass a command line option that was something like -DPorts. I stopped using it a few months ago and it doesn’t seem to have caused any problems. So I’m curious to know if there’s a list of command-line options somewhere so I can figure out why I needed it in the first place?

ardour9 --help on linux shows

Ardour is a digital audio workstation, used for multitrack recording, nonlinear, nondestructive editing and much more.

Options:
  -a, --no-announcements      Do not contact website for announcements
  -A, --actions               Print all possible menu action names
  -b, --bindings              Display all current key bindings
  -B, --bypass-plugins        Bypass all plugins in an existing session
  -c, --name <name>           Use a specific backend client name, default is ardour
  -d, --disable-plugins       Disable all plugins (safe mode)
  -h, --help                  Print this message
  -k, --keybindings <file>    Path to the key bindings file to load
  -m, --menus file            Use "file" to define menus
  -n, --no-splash             Do not show splash screen
  -N, --new <session-name>    Create a new session from the command line
  -O, --no-hw-optimizations   Disable h/w specific optimizations
  -P, --no-connect-ports      Do not connect any ports at startup
  -s, --no-strobe             Avoid "strobe-like" effects in GUI
  -S, --sync                  Draw the GUI synchronously
  -T, --template <name>       Use given template for new session
  -v, --version               Print version and exit

None of my linux versions, going back to 6.9, has any -D flag, but maybe that’s only available for debug builds.
Unless it was -P you used, to avoid connecting ports at startup.

Thanks Peder. I’m assuming that if I used -P I wouldn’t have needed to put the word “Ports” after iit? But I definitely only ever used it while debugging so that’s probably it. Maybe it’s something I needed once to debug something and then I forgot to remove it.

Indeed.
According to gtk2_ardour/opts.cc you should be able to run -D list to see the available debug options, presuming that Ardour is build with debug info.

Interesting stuff Peder and thanks again. I’m not sure I understand any of it but here’s what that command printed out (Ports does seem to be there, just before SnapBBT):-

The following debug options are available. Separate multiple options with commas.
Names are case-insensitive and can be abbreviated.

    all
    AudioEngine
    AudioUnitConfig
    AudioUnitGUI
    AudioUnitProcess
    BackendCallbacks
    Beats
    Butler
    Grid
    MapReset
    PortConnectAuto
    PortConnectIO
    Ports
    SnapBBT
    Soundcloud
    TemporalDomainConvert
    TemporalMap
    VST3Callbacks
    VST3Config
    VST3Process
    WavesAudio
    WavesMIDI
    abstractui
    accelerators
    actions
    audiocacherefill
    audioplayback
    automation
    backendaudio
    backendmidi
    backendports
    backendthreads
    backendtiming
    bindings
    canvasbox
    canvasenterleave
    canvasevents
    canvasitems
    canvasitemsdirtied
    canvasrender
    canvassizeallocate
    canvastable
    capturealignment
    cc121
    chanmapping
    cliprecording
    configuration
    console1
    contourdesigncontrol
    controllist
    controlprotocols
    cutnpaste
    cycletimers
    debuglogtogui
    debugtimestamps
    destruction
    diskio
    drags
    enginecontrol
    eventloop
    faderport
    faderport8
    filemanager
    fileutils
    freesound
    genericmidi
    graph
    guistartup
    guitiming
    iotasklist
    keyboard
    latencycompensation
    latencydelayline
    latencyio
    latencyroute
    launchcontrolxl
    launchkey
    launchpad
    layering
    locale
    ltc
    lv2
    lv2atomfromui
    lv2atomtoui
    lv2automate
    mackiecontrol
    midiclock
    mididiskio
    midiio
    midiplaylistio
    midiringbuffer
    midisourceio
    midisurface
    miditrackers
    miditriggers
    monitor
    mtc
    note
    orderkeys
    panning
    peaks
    pluginmanager
    pool
    processors
    processthreads
    properties
    ptimport
    push2
    regionfx
    savestate
    scopedtempomap
    selection
    sequence
    sessionevents
    slave
    solo
    stateful
    stringconvert
    tempoestimation
    tempomap
    tempomath
    tfsmevents
    tfsmstate
    threadname
    threads
    timing
    topologytiming
    trackdrag
    transport
    triggers
    triggerstop
    tx-ltc
    undohistory
    us2400
    vca
    vstcallbacks
    wiimotecontrol

Yeah, looking at the source code those things seem to produce extra log output for the respective item.
E.g. :

libs/ardour/port.cc:			DEBUG_TRACE (DEBUG::Ports, string_compose ("Port::reconnect(%1) no internal connections\n", name()));
libs/ardour/port.cc:	DEBUG_TRACE (DEBUG::Ports, string_compose ("Port::reconnect(%1) to %2 destinations for backend '%3'\n", name(), c_int.size () + c_ext.size (), bid));
libs/ardour/port.cc:			DEBUG_TRACE (DEBUG::Ports, string_compose ("Port::reconnect() failed to connect %1 to %2\n", name(), (c)));
libs/ardour/port.cc:			DEBUG_TRACE (DEBUG::Ports, string_compose ("Port::reconnect() failed to connect %1 to %2\n", name(), (c)));
libs/ardour/port_manager.cc:	DEBUG_TRACE (DEBUG::Ports, string_compose ("pending port deletions: %1\n", _port_deletions_pending.read_space ()));
libs/ardour/port_manager.cc:			DEBUG_TRACE (DEBUG::Ports, string_compose ("registering AUDIO port %1, input %2\n",
libs/ardour/port_manager.cc:				DEBUG_TRACE (DEBUG::Ports, string_compose ("registering ASYNC MIDI port %1, input %2\n",
libs/ardour/port_manager.cc:				DEBUG_TRACE (DEBUG::Ports, string_compose ("registering MIDI port %1, input %2\n",

That is correct! -D… does nothing in optimized builds.

-Dlist prints all available options in alphabetical order order. Note that debug options are case-insensitive and partial prefix matches work. e.g.

-Dport enables

  • DEBUG:Ports
  • DEBUG:PortConnectIO
  • DEBUG:PortConnectAuto
1 Like