You are here

Request for some command line functions.

I'm just starting to use qtractor again after some years, and I'm delighted with the evolution that it's accomplished in the mean time, thank you very much for that. It's running stable enough for me that I would like to use it as a replacement for my previous "spontaneous recording" setup, which was basically a script setting up the (old and unmaintained) jack time machine with appropriate jack connections upon jack autostart. Is there a possibility of adding to qtractor some basic command line arguments for things like the following:

* path to .qtr file to use as a template instead of the default one.
* path to a new .qtr file to be created, as if a new session had been created and saved in qtractor, with session name perhaps specified as well, or otherwise derived from the name of the .qtr file specified.

This would allow for a script that would work somewhat like my old one, with a session name taken from date/time, to allow spontaneous, one-key-stroke creation of a new session immediately ready for recording, and save on a lot of importing/exporting compared to using a single "scratchpad" session for this purpose. What do you think? :)

Forums: 

Now that I've woken up a little bit more, it occurs to me that I may be able to do what I want by having the script copy a template .qtr file to another location, modify the session name, and open that with qtractor. Also, I'm wondering if simply changing the extension from .qtr to .qtt is enough to cause qtractor to open a file given on the command line as a template rather than a session... guess I'll try it and see.

[EDIT] Yes, it does indeed appear to work this way. I didn't find documentation of the .qtt extension anywhere, just displayed as a filter choice in the file browser. I'd be happy to try to contribute to the new wiki if given editing rights; qtractor is worthy of a little more documentation, I think. :)

rncbc's picture

thanks for considering qtractor once again :)

yes. having your session file suffix as .qtt makes it load as a session template; session templates are just like regular sessions but without any contents (ie. clips, files); though, the layout of everything else is preserved (ie. buses, connections, tracks, plugins, etc.).

I'd be happy to try to contribute to the new wiki if given editing rights.
just tell me your sourceforge.net user name (if you don't have one, please register) and i'll give add you to the wiki editors.

most current documentation is getting outdated by the day, but readily available from here:
http://sourceforge.net/projects/qtractor/files/qtractor/docs

cheers

Sourceforge username is the same as the one here. :)

Incidentally, in the process of learning just how much of a record-ready state could be saved in a session file, I discovered the following:

If qtractor is closed with the record buttons in an "armed" state, a 0-byte audio file is left in the session directory, and when the session is resumed, the file is skipped over in the numbering sequence. It never appears in the right-hand files list, and isn't removed by doing a "cleanup". Not a big issue, but I thought I'd mention it.

rncbc's picture

re. Sourceforge username is the same as the one here...
done you're now a member of the wiki editors. please test whether you can do anything. the wiki is pretty fresh new and i'm not that confident if member privileges works as advertised. so, please again, report back if you find something is not working as expected.

re. If qtractor is closed with the record buttons in an "armed" state, a 0-byte audio file is left in the session directory
maybe if left in an armed state and an actual recording was ever started--pretty much what a template with armed tracks is :)
thanks for the notice, i'll try to fix it asap.
cheers

Wiki editing seems to work, at least as far as a quick test edit goes. Haven't tried to create any pages yet, though. Is there a general guideline for structure? I might start by transferring the docs to wiki pages, unless that's a bad idea for some reason...

rncbc's picture

great. would you mind moving this thread into this other ? the OP (planar2) was granted the same wiki editor rights but somehow to no avail yet. in fact the wiki was incidental to his demand. would you care to join and help him? tia.

there's no general guideline for structure; meanwhile...

i would just suggest joining the higher standard in writing excellence of the (pretty) older user manual (.odt) with the accessibility and top-notch friendliness of the (not so)newer quick start guide and user manual (.epub), as much as humanly possible ;)

cheers

In case anyone else would find it useful, the script below, when combined with an appropriate template file, will create a new session from the template, named after the date-time, and open it in qtractor, ready for recording with no further ado. You should edit the variables per your own preferences.
---------------------------------------------------------------------------------------------------
#!/bin/bash

SESSION_NAME=`date +%Y%m%d-%H%M`

QTRACTOR_DIR="$HOME/qtractor"

SESSION_DIR="$QTRACTOR_DIR/$SESSION_NAME"

SESSION_FILE="$SESSION_DIR/$SESSION_NAME.qtr"

TEMPLATE_FILE="$HOME/.config/rncbc.org/template.qtt"

mkdir $SESSION_DIR

sed \
-e "s/<session version=\"\([^\"]*\)\" name=\"[^\"]*\">/<session version=\"\1\" name=\"$SESSION_NAME\">/" \
-e "s?<directory>.*</directory>?<directory>$SESSION_DIR</directory>?" \
$TEMPLATE_FILE > $SESSION_FILE

qtractor "$SESSION_FILE" &

Add new comment