Copying session


Session templates do not work with linuxsampler lv2 (see ) and I have a huge session with tens of tracks for an orchestral template.

I am trying to find a a workaround : I have coded a python script that copies the session and changes the names appropriately, that you can find here : .

However, although the initial session works, and I can create regions on it, in the new one, after copying, I cannot create new regions, and Ardour crashes with an error about SMF.

So, do I have to modify anything else than what I modify in the script to have a functional session ?

Thank you

There should be nothing to do. Please provide more information and/or join us on IRC to discuss.

Finally, I found the reason of the error.
I did not rename the directory interchange/sessionName to interchange/newSessionName.

It entailed that Ardour would not find some midi regions I had created in the template to test (and removed after that off the track, but Ardour keeps them).

Here is the new script which can be easily adapted to copy any other session.

For the bug on Mantis ( ), do you need more information ?

Your script will break in various conditions. You unconditionally set the ID counter to a fixed value. That won’t work.

Well, I do not know the spec of an ardour session file. In what source files could I look at to understand it ? And specifically for the id counter ?

For what I understand, as long as the id counter is an unique id in the session file, it should work (and yes, it is not the case in my script but I am going to fix that) ; is that right ?

the ID counter must be above that of all existing ID’s in the session file. You should try to grab the existing value from the file and use it.