Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 08-22-2018, 01:10 PM   #41
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

It depends. If you want to make ConfigVars persistant, you probably need to set them in the Reaper.ini as well, or otherwise, it will not exist after restarting Reaper.

There are exceptions though, like the config-var that changes the font-size of the IDE, this will be altered in the reaper.ini by Reaper itself.

Oh, and config-vars that are of the project(usually those set in the Project-Settings-dialog) persist, when you save the project.

You need to experiment with it a little. Setting some of the config-vars is not really helpful. If in doubt, try to find an action that does this for you.

I made a list of which action sets which config-var in the first post of this thread. Just check, if one of them sets defsendflags as well.
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-22-2018, 04:55 PM   #42
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Thanks for that, and of course the whole project. The only actions I can find that affect that variable are the SWS actions:

SWS/S&M: Set default track sends to MIDI only
SWS/S&M: Set default track sends to audio and MIDI
SWS/S&M: Set default track sends to audio only

They don't cause changes that persist either. Wonder why. I'd like to know more about the general situation, even though it doesnt cause a major problem to leave it non-persistant. It just seems the script should ideally behave like going into preferences and changing the value, then clicking OK.

I suppose I could use:

Code:
inipath = reaper.get_ini_file()
retval = reaper.BR_Win32_WritePrivateProfileString("reaper", "defsendflag", tostring(new_defsendflag_int), inipath)
but not entirely sure that is a great idea, even if the syntax is good (?).
FnA is offline   Reply With Quote
Old 08-23-2018, 05:04 AM   #43
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,093
Default

If you change these (or other) values via Preferences it seems they get written to REAPER.ini in the moment you hit Ok / Apply, so yes, I think to make them persistant when changing via script you need to use reaper.BR_Win32_WritePrivateProfileString to write the values to the .ini file.

Last edited by nofish; 08-23-2018 at 06:52 AM.
nofish is offline   Reply With Quote
Old 08-23-2018, 10:30 AM   #44
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

hm. I'll try it on a portable install.

Actually, I suppose the path structure would be different on regular install. Just make a backup first...

I wonder if any popular/established scripts use that function. cfillion mentioned in my thread: https://forum.cockos.com/showthread.php?t=175403 that GET version worked on Mac. I'm on Windows 7.
FnA is offline   Reply With Quote
Old 08-23-2018, 01:15 PM   #45
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

We at ultraschall.fm use them successfully on Win and Mac.

If you use the Set-function, it will be written into reaper.ini, BUT Reaper will not recognize them until you restart Reaper.
That's why setting the ConfigVar and the entry in reaper.ini is helpful.
The ConfigVar to have it right away, the entry in reaper.ini to have it also after restart.
Otherwise, you would need to restart Reaper for changes to take effect.

Regarding the path-structure, just use the get_ini_file(), GetExePath() and GetResourcePath() functions and you are on the same side, no matter if it's a portable or a "stationary" installation.
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-23-2018, 02:14 PM   #46
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Thanks for confidence boost/confirmation. I figured it -probably- worked that way but it gets into things I don't have a whole lot of experience in. Tried it out briefly in the past to set theme color numbers with it, but "wait for restart" was deal breaker. Don't recall if I also tried configvar simultaneously, but I think maybe did. Is it true to say that only variables in [reaper] section are accessible to setconfigvar? I'll look in your docs to see if there's mention of that.
FnA is offline   Reply With Quote
Old 08-24-2018, 05:13 AM   #47
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Quote:
Originally Posted by FnA View Post
Is it true to say that only variables in [reaper] section are accessible to setconfigvar? I'll look in your docs to see if there's mention of that.
In parts. All config-vars are only stored in either the [reaper]-seciton of the reaper.ini or the projectfile itself.

BUT: not all entries in the [reaper]-section are also available as config-vars.
When in doubt, the ones in my docs are all useable.
I also added to the docs the reaper.ini-entry that you need to change to set it permanently.
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-24-2018, 08:30 AM   #48
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Good stuff mespotine. Thanks!
FnA is offline   Reply With Quote
Old 09-01-2018, 12:20 PM   #49
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Updated Reaper-API-functions reference.

Added descriptions and missing stuff to Lua's gfx-functions, especially blit/deltablit and gfx.dock.
Corrected some mistakes.
Meo-Ada Mespotine is offline   Reply With Quote
Old 09-01-2018, 01:06 PM   #50
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

Do we also have a description of the file format and decent functionality of the OSC "Pattern Config Files" (e.g. Default.ReaperOSC) ?

See this discussion -> https://forum.cockos.com/showthread.php?t=210446

-Michael
mschnell is offline   Reply With Quote
Old 09-01-2018, 01:12 PM   #51
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Not yet, as I have not done anything with OSC yet.

But as far as I could see, from flying through default.reaperosc, it is commented quite good or at least a lot. So a lot should be possible through that...

(havent't checked yet, though)
Meo-Ada Mespotine is offline   Reply With Quote
Old 09-02-2018, 01:32 AM   #52
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

Yep.

But according to the thread I mentioned above, there is a default behavior for plugin parameters and there is a dedicated behavior for ReaEQ, denoted in the "FX_EQ_..." lines.

IMHO it's not likely that the behavior for ReaEQ, and the detection that a certain plugin is a ReaEQ instance, is hard coded. And hence it should be possible to add customized behavior for other plugins, as well.

-Michael
mschnell is offline   Reply With Quote
Old 09-02-2018, 01:25 PM   #53
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Probably. I will look into it at some point into the future but need to get at least some basic experience with OSC before that to write something useful.
Meo-Ada Mespotine is offline   Reply With Quote
Old 09-11-2018, 10:24 AM   #54
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Added the new Opus-Render-Codes, that supports multichannel-options as introduced by Reaper 5.95.

Docs: https://github.com/Ultraschall/ultra...rings-docs.txt

Ini-File with the constructible render-codes: https://raw.githubusercontent.com/Ul...nder-Codes.ini
Meo-Ada Mespotine is offline   Reply With Quote
Old 09-13-2018, 08:45 AM   #55
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Updated ReaScript-docs, ActionList and ConfigVars-docs to Reaper 5.95.
Meo-Ada Mespotine is offline   Reply With Quote
Old 09-18-2018, 09:25 AM   #56
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Updated config-var-docs, which includes now prerelease only variables(partially documented), documentation for miscopts.
I also updated the display-config-vars-script.

And, I added render-cfg-codes for audio-cd-rendering(with lead-in-silence supported from 0 to 100000 ms (100 secs)).
Meo-Ada Mespotine is offline   Reply With Quote
Old 09-20-2018, 03:15 AM   #57
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Does anyone know if there's some secret way to initialize (VST) plugin parameters (using floating point numbers) in the .rpp file that doesn't involve the base64 state chunk? (I am not asking if there's API support inside the Reaper process itself, since there is, but this is about generating the .rpp files automatically outside of Reaper.)

Alternatively, if that isn't possible, is it possible to write that base64 chunk into the project file so that just contains the plugin's parameter values and not the extra plugin state that can't be automatically generated by 3rd parties?
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 09-20-2018 at 04:46 AM.
Xenakios is offline   Reply With Quote
Old 09-20-2018, 08:36 AM   #58
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

I think it is probably another reverse-engineering-project, where you would need to decode the Base64-strings and find out, how they actually work and how to manipulate them.

Or, you can look into my render-code-docs, where I reverse-engineered the render-cfg-strings who contain all render-settings in an RPP-file. Maybe this attempt works for the plugin-parameters too.
Meo-Ada Mespotine is offline   Reply With Quote
Old 09-20-2018, 08:44 AM   #59
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Damn, I just realized the parameter values can of course be dealt with by adding automation envelope chunks (with just one envelope point that will be the value) into the .rpp file...

This doesn't solve the situation though where one might want to insert plugin presets into the .rpp file, though.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 09-20-2018, 09:16 AM   #60
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Do you know a way to decode the BASE64-string in Lua? This may help me to get more into details of these strings in general...

Haven't found something properly 'til now...
Meo-Ada Mespotine is offline   Reply With Quote
Old 10-18-2018, 07:00 AM   #61
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,093
Default

Nitpick:
https://github.com/Ultraschall/ultra...tion.txt#L6579

The 'Volume fader envelope range:' dropdown has moved to 'Envelope display' section meanwhile.

And while I'm here, your DevDocs and the corresponding scripts are immensely useful, thanks again.
nofish is offline   Reply With Quote
Old 10-19-2018, 05:34 AM   #62
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Thankx, will update this in the next update
__________________
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 10-19-2018, 09:41 AM   #63
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,716
Default

Quote:
Originally Posted by Xenakios View Post
Does anyone know if there's some secret way to initialize (VST) plugin parameters (using floating point numbers) in the .rpp file that doesn't involve the base64 state chunk? (I am not asking if there's API support inside the Reaper process itself, since there is, but this is about generating the .rpp files automatically outside of Reaper.)

Alternatively, if that isn't possible, is it possible to write that base64 chunk into the project file so that just contains the plugin's parameter values and not the extra plugin state that can't be automatically generated by 3rd parties?
You can use the following base64 data (all little endian):

4 bytes: VST UID
4 bytes: low 16 bits are program index, if desired (high bits should be 0)
4 bytes: 0xdeadbeef
4 bytes: 0xdeadf00d
all remaining data: parameters values as 32-bit floats
Justin is offline   Reply With Quote
Old 10-19-2018, 10:40 PM   #64
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

Regarding preset files, that use a similar encoding and might be considered here, as well, I seem to remember that after the end of the base64 string there is the (alias?-) name preceded by a byte count, and maybe some definition about Reaper's VST embedding features.

-Michael (it's a while since I did some research on that - unsuccessfully trying to find out how to automate certain what parameters of a Kontakt library)
mschnell is offline   Reply With Quote
Old 11-02-2018, 10:03 AM   #65
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

New additions:

The following scripts monitor and display changes in StateChunks(Track,Envelope,Item and Projects). Read the MessageBox, that will be displayed, when starting the script, for instructions:

Project-State-Chunk-Monitor
Track-State-Chunk-Monitor
Item-State-Chunk-Monitor
Envelope-State-Chunk-Monitor


Not as good as the diff-monitoring of GitHub, but probably helpful anyway
__________________
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 11-10-2018, 07:13 PM   #66
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

mespotine, you seem to be the genious who could bring that wanted ReaLearn json midi mapping generator into life? See https://forum.cockos.com/showthread.php?t=213255
TonE is offline   Reply With Quote
Old 11-12-2018, 03:26 AM   #67
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Quote:
Originally Posted by TonE View Post
mespotine, you seem to be the genious who could bring that wanted ReaLearn json midi mapping generator into life? See https://forum.cockos.com/showthread.php?t=213255
Sorry, I currently lack the time to really work on scripts for the community(you will see in a few weeks, why that is.)

I may work on helper-functions to parse JSON at some point, but this has no priority for me right now.


In Regards of ReaLearn, I have no experience at all, same as MIDI...


So much to do, so little time.. :/
__________________
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 11-12-2018, 08:15 PM   #68
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

No problem, the idea is out, waiting. ReaLearn is probably the most important thing for Reaper, if you do not
(1) use only the mouse with reaper
(2) use only the qwerty with reaper

As soon as you start using some musical devices/hardware/midi controllers, then ReaLearn opens up new worlds. And best part is since a few months ReaLearn has this great feature of being able to export/import entire mappings as .json to/from clipboard.

Thanks for all your shared stuff, you seem to dig always up to the latest atoms and last dusts, regarding creating documentations, which is perfect.
TonE is offline   Reply With Quote
Old 11-13-2018, 09:01 AM   #69
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

That sounds interesting. I'll look into it at some point, as I'm more and more in need of additional hardware for pedals and mutebuttons and such.
__________________
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 11-14-2018, 04:03 AM   #70
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,910
Default

This doesn't seem to be documented yet (new feature added in v5.92): the seventh and eighth bits (&64 and &128) of the projgridframe configvar are set when the grid line spacing and grid snap spacing (respectively) are set to Measure.
cfillion is offline   Reply With Quote
Old 11-14-2018, 11:20 AM   #71
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

@cfillion Thnx, will add that
__________________
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 11-26-2018, 04:39 AM   #72
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 564
Default

Hey, I have a question about the Render_CFG_Code. How to use it? Is it can be used in a Lua script?
dsyrock is offline   Reply With Quote
Old 11-27-2018, 06:20 AM   #73
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by dsyrock View Post
Hey, I have a question about the Render_CFG_Code. How to use it? Is it can be used in a Lua script?
No, I don't think there's anything directly useful that could be done in Lua with those. Indirectly, maybe you could generate a .rpp file with Lua and run Reaper as an external process to offline render that project with the format configuration settings.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 11-27-2018 at 06:30 AM.
Xenakios is offline   Reply With Quote
Old 11-28-2018, 09:40 AM   #74
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

What Xenakios said.

Or you wait until mid-December... ^^
__________________
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 11-28-2018, 02:55 PM   #75
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,450
Default

Code:
 <REAPER_PROJECT 0.1 "5.963" 1543441396

What do 0.1 and 1543441396 stand for?

Edit: The big number is the Unix time
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 11-28-2018 at 03:27 PM.
amagalma is offline   Reply With Quote
Old 11-28-2018, 04:04 PM   #76
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by amagalma View Post
Code:
 <REAPER_PROJECT 0.1 "5.963" 1543441396

What do 0.1 and 1543441396 stand for?

Edit: The big number is the Unix time
IIRC the 0.1 is the Reaper project file format version. All this time they haven't needed to make that higher because the things they have added have been incremental in nature and not breaking the old way things worked.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 11-30-2018, 10:00 AM   #77
michaeltonight
Human being with feelings
 
michaeltonight's Avatar
 
Join Date: Jun 2010
Location: Texas
Posts: 357
Default

wow, Mespotine, this is an amazing resource that you've provided. Many thanks to you!
michaeltonight is offline   Reply With Quote
Old 12-17-2018, 06:39 AM   #78
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Updated Links to my new Reaper-Internals-pages. Please update your bookmarks.
__________________
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 01-04-2019, 12:31 AM   #79
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,450
Default

Thank you!


A documentation of the reaper-mouse.ini too would be nice.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 01-05-2019, 05:38 AM   #80
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,612
Default

Quote:
Originally Posted by amagalma View Post
Thank you!


A documentation of the reaper-mouse.ini too would be nice.
I already did that

https://mespotin.uber.space/Mespotin...aper-mouse.ini


You can also find numerous other config-files described on that page.
__________________
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
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 04:27 AM.


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