Old 04-10-2019, 07:51 PM   #1
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 565
Default Is it possible to change framerate by script?

I'm planning to run a script like this:

Code:
local framerate=reaper.TimeMap_curFrameRate(0)

reaper.Main_openProject("F:\Test\Test.RPP")

-- then something like"setprojectframerate(framerate)"
What I want is getting the framerate value from Project A and apply it to Project B, but I can't find any API is able to do this.
dsyrock is offline   Reply With Quote
Old 04-11-2019, 03:52 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Does this help?`

https://mespotin.uber.space/Ultrasch...tml#projfrbase
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 04-11-2019, 08:16 PM   #3
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 565
Default

Quote:
Originally Posted by mespotine View Post
Thanks. But I need to change a project's framerate individually. I think the reaper.ini is only related to the default project's preferences.
dsyrock is offline   Reply With Quote
Old 04-12-2019, 05:37 AM   #4
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Ignore the Reaper.ini for your case.

Switch to the project, whose framerate you want.
Get the value of projfrbase.
Change to the project, that shall get the new one.
Set the value of projfrbase.

You should use the SWS-functions for getting\setting configvar

This should work.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 04-13-2019, 07:24 PM   #5
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 565
Default

Quote:
Originally Posted by mespotine View Post
Ignore the Reaper.ini for your case.

Switch to the project, whose framerate you want.
Get the value of projfrbase.
Change to the project, that shall get the new one.
Set the value of projfrbase.

You should use the SWS-functions for getting\setting configvar

This should work.
It worked! Thanks!
dsyrock 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 02:25 PM.


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