Still struggling with absolute file paths

Given the following setup (Linux).


In SongFolder, I run ardour8

cd SongFolder
ardour8 -N ./MySong

This creates an Ardour project MySong.
In Ardour, I import the files from the Audio folder, copying them into the session.
Save and Quit

The Ardour session file, ./MySong/MySong.ardour now contains

<Option name="audio-search-path" value="/full/path/to/SongFolder/MySong/interchange/The_Granite_Gaze/audiofiles"/>

I would have expected an empty search path (since it is the default), or at most a relative path (e.g. interchange/audiofiles).

What did I do wrong?

How are you importing? Drag and Drop, Session>Import, or something else?


Session > Import (Ctrl-I) with “copy audio files to session”.

What filesystem is your session on?


Btrfs. But I also see this on ext4 and NFS.

I ran a series of tests on different file systems and directories, and accidentally found the solution :relaxed:.

If the /path/to/session is a full (absolute) path, it works. The session file will not contain absolute path names.
If, however, the path is a relative path, e.g. ./to/session, all paths in the session file will be absolute.

1 Like

Interesting, meaning the ‘/path/to/session’ when you run the ardour8 -N /path/to/session/ command?


Create the song:

cd /tmp/SongFolder
ardour8 -N /tmp/SongFolder/MySong

after saving, MySong.ardour contains:

 <Option name="audio-search-path" value=""/>

Change something, using full path:

ardour8 /tmp/SongFolder/MySong

after saving, MySong.ardour still contains:

 <Option name="audio-search-path" value=""/>


cd /tmp/SongFolder
ardour8 -N ./MySong

Now MySong.ardour contains:

<Option name="audio-search-path" value="/tmp/SongFolder/MySong/interchange/MySong/audiofiles"/>

It will stay at that value, even when revisited with full path name.

Note that

ardour8 -N MySong

will create a session at the location specified with default-session-parent-dir in the ardour config, not at the current directory in the file system. Created (and visited) this way, the audio-search-path will stay default (empty).

Also note that the -N option merely verifies there is no such session yet.

I would find a command line option to specify the session parent dir very useful. E.g., for a simple wrapper:

exec /bin/ardour8 --session-parent-dir=`pwd` ${+"$@"}