Old 02-11-2016, 10:54 AM   #1
skippington
Human being with feelings
 
Join Date: Apr 2009
Posts: 6
Default Import script for QSC Touchmix

Hi all,

I needed a script to import session files from a QSC Touchmix desk into reaper, so I wrote the attached lua code. The touchmix writes an xml file that summarizes the session, so the attached lua script reads this and then imports all of the dependent files into a reaper session. You just select the xml file with the usual reaper file selection dialog and then everything just takes care of itself.

The code defaults to import from the current cursor postion, leaves a gap of 5s between regions and creates and names new tracks. You can easily adapt this behaviour by changing some flags in the script.

One other thing - I couldn't get the Lua xml library (or any other library for that matter) to load in reaper, so I wrote my own hacky xml parser which is part of the script.

The code is not very pretty and there are quite probably plenty of bugs that I haven't yet noticed since I haven't extensively tested it. I suspect that it could easily be adapted to import any session files that have a xml summary file, although I haven't tried!

Hope it's useful to someone? Just stick the file somewhere in your 'actions' path in a file called 'whatever you like'.lua and it should work.


cheers

Adam
Attached Files
File Type: lua touchmixReader.lua (9.7 KB, 314 views)
skippington is offline   Reply With Quote
Old 05-23-2020, 07:57 AM   #2
funkydrum
Human being with feelings
 
Join Date: Oct 2019
Location: Bremen, Germany
Posts: 65
Default works nicely - thank you!

Well, this script seems to have been sleeping for years and aparently very few people work on both a QSC Touchmix and Reaper, but now it serves me very well. Just wanted to say THANK YOU for sharing it!


Funkydrum
funkydrum is offline   Reply With Quote
Old 05-26-2020, 01:54 PM   #3
funkydrum
Human being with feelings
 
Join Date: Oct 2019
Location: Bremen, Germany
Posts: 65
Default Could somebody help to modify /debug this script, please?

Hello,
can anybody with some coding skills please help me to modify this script? My programming skills are really limited and a helping hand or a hint would be be apreciated.
"As is" the script works nicely and is very helpful, but it always adds new tracks to the reaper project and thus ignores a REAPER template with defined tracks.
Therefore, I would like to create a variant of that script that doesn't insert new tracks in REAPER but uses existing ones from my REAPER template and eventually keeps the track names from the template. In fact, it should only inport the existing media files to the right tracks in the right order automatically.

I tried to understand the script and found this section :


"-- now we need to use the xml structure to read the files into reaper
-- start importing from current cursor position
-- get the cursor position before we move it...
offset = reaper.GetCursorPosition() -- read cursor position
between = 5 -- default 5s gap between regions
ntflag = 1 -- flag 1 to create new tracks for import; 0 to use existing tracks
nameflag = 1 -- flag 1 to rename tracks with xml 'friendly names' "


Thought I was lucky and hoped by replacing both the "1" in bold by "0", I would be done already. However, when I change both variables to "0" the script gets stucked showing this message:
"touchmixReader_keeptracks&names.lua:106: bad argument #1 to 'SetOnlyTrackSelected' (MediaTrack expected)"


It seems that some code lines miss arguments. Perhaps it was never tested with these variables set to "0".

Any idea how to fix that and how to check /correct the script for other lines with missing arguments?


Any hint would be apreciated


cheers Funkydrum
funkydrum is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.