Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 10-21-2022, 04:25 AM   #1
soulaccess
Human being with feelings
 
Join Date: Jul 2012
Posts: 23
Default API: TrackFX_AddByName() ignores default settings (not quite yet FIXED)

EDIT: Fixed in Reaper V6.70
----------------------------

AFAICT when inserting a JS Effect with TrackFX_AddByName() the "Default settings for new instances" are ignored. Oversampling is set to "no oversampling" and embedded UI to "no"
This only happens with JS Plugins, it works as expected with VST Plugins.

Steps to recreate:
- in the FX Browser right-click the Plugin "JS: Distortion" and set "Default settings for new instances" > "FX instance oversampling" to "Oversample up to [...]"
- select a track and execute LUA code (below)
- check the track with the instantiated Plugin, oversampling will be set to "no oversampling"

Code:
track = reaper.GetSelectedTrack2(0, 0, true)
reaper.TrackFX_AddByName(track,"JS:Distortion",false,-1)

Last edited by soulaccess; 11-23-2022 at 06:30 AM. Reason: Bug fixed in Reaper V6.70
soulaccess is offline   Reply With Quote
Old 10-21-2022, 02:11 PM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 14,639
Default

Looking at a fix for this, thanks!

As a workaround, you can use "JS:guitar/distortion" instead (include the relative path).
Justin is offline   Reply With Quote
Old 11-22-2022, 01:49 PM   #3
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,787
Default

this update in 6.70 doesn't seem to work well. it has broken many scripts for me. I'm investigating what's going on.
it works on Linux but returns -1 on Windows
Code:
reaper.TrackFX_AddByName(track, "JS:Loudness Meter Peak/RMS/LUFS (Cockos)", false, -1)
and this also seems affected. it works on Linux but returns -1 on Windows
Quote:
reaper.TrackFX_GetByName(track, "JS:Loudness Meter Peak/RMS/LUFS (Cockos)", false)
heda is offline   Reply With Quote
Old 11-22-2022, 03:05 PM   #4
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,146
Default

Not sure if related but,...

If there is no "reaper-jsfx.ini" file built your code doesn't work and returns -1, once the ini file is present they work.
To build ini file I open FX Browser and select All Plugins > JS

Win10, REAPER 6.70_x64 (portable)
Win10, REAPER 6.71rc2_x64 (portable)

Last edited by Edgemeal; 11-22-2022 at 03:15 PM.
Edgemeal is offline   Reply With Quote
Old 11-23-2022, 01:03 AM   #5
soulaccess
Human being with feelings
 
Join Date: Jul 2012
Posts: 23
Default

Code:
reaper.TrackFX_AddByName(track, "JS:Loudness Meter Peak/RMS/LUFS (Cockos)", false, -1)
@heda: Yes you are right, there are now some inconsistencies with TrackFX_AddByName - sorry I missed that.

Your specific example works for me on Mac Mojave, but here this happens:
Pre 6.70: TrackFX_AddByName used to work when passing the name defined in the "desc:"-tag of the FX .
Now you must pass the actual filename of the FX for it to work and even then it fails for some FX.
Sorry I can't be more specific, as I haven't yet found a reliable pattern for which the call fails.

EDIT: I just tested on a fresh portable install and I can't reproduce the problem there.

AND weirdly enough, in the regular install, inside the "Effects" folder I have a folder called "js_plugins" (I think it contains witty's plugins) - now, when I delete this folder everything works fine again. The "js_plugins" contains some .wav, .txt, .rpl, .png and JS files in a bunch of folders.

EDIT 2: I tested some more and found that the .png files are causing the problem. When I delete the .png files inside "Effects/js_plugins/witti" then everything works fine here.

Last edited by soulaccess; 11-23-2022 at 03:41 AM.
soulaccess 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 08:18 PM.


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