|
|
|
09-16-2021, 01:11 AM
|
#1
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,681
|
ReaScripts: Access another (named) project?
Is there any way to access another, named, project and then its track chunks from a lua script?
I have looked through the API documentation but did not see a suitable one.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
09-16-2021, 02:33 AM
|
#2
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Not possible to use reascript API with unopen project
but you can parse and do text processing on .rpp
More advanced, you can use our RPP Lua Parser :
https://github.com/ReaTeam/ReaScripts/wiki/RPP-Parser
It is more advanced than simple line per line text parsing as it actually understand .rpp chunks structure.
|
|
|
09-16-2021, 04:06 PM
|
#3
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,681
|
OK. Thank you.
How about if I load the project ("XXX") into a new tab, then run the lua script in my main project ("AAA"). Can I run a script for project AAA and access the track chunks of the project XXX, in the other tab?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
09-16-2021, 06:27 PM
|
#4
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
|
Yes, this should be possible.
Use EnumProjects() to get a pointer ('ReaProject') to the (background) project of interest.
Use that pointer in GetTrack() to get track from background project, then GetTrackStateChunk().
|
|
|
09-17-2021, 06:30 AM
|
#5
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
possible, but way less efficient than the rpp parser. especially if you have VST like Kontakt etc.
|
|
|
09-17-2021, 10:55 AM
|
#6
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,681
|
Thank you both. I'll give the parser a try out first.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:43 AM.
|