Old 08-13-2019, 03:07 AM   #1
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 506
Default Copying tracks from one project to another

I'm struggling to find a nice way to copy tracks from one project to another in lua.

I'm having to resort to native commands, and it's getting messy because the script doesn't wait for them to complete.

I can get the tracks, and select the destination project, but there doesn't seem to be any way to instantiate them in the selected project. The only track management that exists in script seems to be within a single project.

Has anyone tried anything similar?
Travesty is offline   Reply With Quote
Old 08-13-2019, 02:58 PM   #2
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,558
Default

If you use my Ultraschall-API, you can use

ultraschall.GetTrackStateChunk_Tracknumber to get the StateChunk of a track. This holds all settings and attributes of a track.
https://mespotin.uber.space/Ultrasch...nk_Tracknumber

reaper.SelectProjectInstance to select another project
https://mespotin.uber.space/Ultrasch...rojectInstance

InsertTrack_TrackStateChunk to insert the TrackStateChunk into the other project
https://mespotin.uber.space/Ultrasch...rackStateChunk

This would be my approach.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 08-21-2019, 06:56 AM   #3
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 506
Default

Cool, thanks, I'll try that
Travesty 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 07:14 PM.


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