Old 08-13-2019, 03:07 AM   #1
Human being with feelings
Travesty's Avatar
Join Date: Nov 2014
Posts: 485
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
Human being with feelings
mespotine's Avatar
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,396

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.

reaper.SelectProjectInstance to select another project

InsertTrack_TrackStateChunk to insert the TrackStateChunk into the other project

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

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 02:38 AM.

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