Questions about templates

I know templates I create go in ~/.config/ardour5/templates.

But where are the templates that get installed with Ardour?

Also, one template mentions it uses lua script to accomplish “stuff”. How does the template know to run the script and where is it?

Details of why I ask:

  • The laptop I’m configuring will be used in a multi-user studio.
  • It will have a login for each user.
  • I’m thinking of having templates for common studio uses.
  • I’d like to have them common to all users.

(In addition, I would like to figure out how to use lua scripts to automate some things at Ardour start. Like disconnecting some “un-needed connects during recording” that get connected by default.)
Mac

${ARDOUR_DATA_PATH}/templates/ – for the official binary on Linux, that expands to /opt/Ardour-5.12.0/share/templates/ and ~/.config/ardour5/templates/

There are two distinct ways:

  1. Some templates are only scripts. A “SessionInit” script can create a session on the fly.
  2. An existing template may contain a script that is executed after a session is created from the template (to fix things up, or customize the session further).

(1) files are in the scripts folder /opt/Ardour-5.12.0/share/scripts/ and ~/.config/ardour5/scripts/
(2) is a file template.lua inside an existing template

Both are documented in the example:

Read-only, or writable and shared by all users? The former should be easy, the latter would involve some hacks though.

Thanks! But, I have two pc’s here running Ubuntu 19.04 with Ardour 5.12.0 and the /opt is empty. Some stuff in /etc/ardour5 but no folders for script or template.

And yes, shared by all users, but read only.

Sounds like you are using a version of Ardour obtained from a repository. We can’t recommend or support this. The official version will install into /opt

Hmm…guess assuming UbuntuStudio 19.04 would have the latest in the distro was foolish on my part. :wink:

Do you recommend an apt purge of what’s there before downloading from ardour.org?

Should I plan on building it (I don’t cherish this idea, but if need be…) or use the bundle download? Implications of using the bundle? (latency, etc.)

No need, official binaries from ardour.org can be installed in parallel to distro builds.

We don’t know what various distros do, so we can’t say. Audio/MIDI processing however should be identical. Ardour itself doesn’t add latency either.

Anyway I guess Ubuntu just sets ${ARDOUR_DATA_PATH} to something else, probably /usr/share/ardour5 or something, depending on their policy. Maybe locate session_template_record.lua

yup, it’s in /usr/share/ardour5/scripts/session_template_record.lua

Back looking at this again…I haven’t quite digested the session_template_record.lua script as yet.

Currently on my system, as far as I can tell, there are no template files.

But, when I choose new session I get a list containing Empty Template, Advanced Session, Recording Session, and Live Band.

Since the template directories are empty, I assume the Advanced, Recording, and Live Band come from the .lua files in /usr/share/ardour5/scripts/ where they are named as type: SessionInit or EditorAction?

Where does Empty Template come from?

I got into this because I was looking at where/how to avoid the click track (and possible the monitor) from getting auto routed…maybe it’s obvious, but, I’ve been known to look right at the obvious and miss it. :roll_eyes:

It’s a built-in default.

The metronome (Click out) connections are saved with the session. So a session-template should work. Just Session > Save as template…