Old 06-13-2017, 09:31 AM   #1
benf
Human being with feelings
 
benf's Avatar
 
Join Date: Oct 2008
Location: France
Posts: 2,552
Default LUA and track templates

Hi,

I searched in the API functions, but didn't find any way to load track templates using a lua script. Does anyone know if this is possible ?

Thanks
__________________
Listen and download my music on https://benest.bandcamp.com/
benf is offline   Reply With Quote
Old 06-13-2017, 09:54 AM   #2
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,369
Default

SetTrackStateChunk
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 06-13-2017, 03:59 PM   #3
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,982
Default

yes! this is easier than dealing with chunks, but of course you can always do chunks if you need more advanced use.
Quote:
reaper.Main_openProject(string name)

opens a project. will prompt the user to save, etc.
if you pass a .RTrackTemplate file then it adds that to the project instead
__________________
HeDaScripts for REAPER
heda is offline   Reply With Quote
Old 06-14-2017, 07:58 AM   #4
benf
Human being with feelings
 
benf's Avatar
 
Join Date: Oct 2008
Location: France
Posts: 2,552
Default

@MPL :
Yes, of course ! I was focusing on track templates, but this could be a good solution. Easier if track templates are usable chunks !

@Heda :
Thanks for the answer. But my purpose is to open track templates using a lua script, even in an existing project.
__________________
Listen and download my music on https://benest.bandcamp.com/
benf is offline   Reply With Quote
Old 06-14-2017, 02:06 PM   #5
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,982
Default

Quote:
Originally Posted by benf View Post
@Heda :
Thanks for the answer. But my purpose is to open track templates using a lua script, even in an existing project.
it's exactly what it does. it inserts the track template in your existing project. Isn't that what you need?
__________________
HeDaScripts for REAPER
heda is offline   Reply With Quote
Old 06-14-2017, 02:19 PM   #6
benf
Human being with feelings
 
benf's Avatar
 
Join Date: Oct 2008
Location: France
Posts: 2,552
Default

Oh ! Excuse me. Didn't understand that at first. You explained it well, though.
Thanks a lot !
__________________
Listen and download my music on https://benest.bandcamp.com/
benf is offline   Reply With Quote
Old 04-15-2019, 11:32 AM   #7
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 360
Default

Is there a way to specify the track it gets loaded to?

Ideally, I'd like to be able to replace a specific track, although of course I could delete the old track first.

I guess I could add it and move it. I'll try that.
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 04-15-2019, 04:31 PM   #8
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 360
Default

Cool, works great!

When I gave it a fully qualified track template path, it loads without prompt.

Now I'm wondering if I can save track templates the same way... doesn't seem like the reaper save method allows me to force a name and extension.

EDIT: Nevermind. I am going to move to saving and loading fxchains instead, I think.
__________________
eric moon
Very Stable Genius
https://gogolab.com/

Last edited by woodslanding; 04-15-2019 at 09:52 PM.
woodslanding 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 03:17 PM.


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