Old 10-15-2015, 07:28 PM   #1
James HE
Human being with feelings
 
James HE's Avatar
 
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,467
Default reascript -how to manipulate Master FX? Monitor FX?

What do I need to use for 'track' to manipulate fx in the master and monitor fx using TrackFX_SetParam()


*I guess it's 0 for Master - can't get to the monitor FX though it seems, sigh.

Last edited by James HE; 10-15-2015 at 07:55 PM.
James HE is offline   Reply With Quote
Old 10-15-2015, 10:24 PM   #2
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Track = GetMasterTrack()
Track#0 is the first track.

Or did I missed something?

Last edited by mpl; 10-15-2015 at 11:17 PM.
mpl is offline   Reply With Quote
Old 10-16-2015, 12:41 AM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

There is nothing for monitor fx, we already experienced that limitation with heda :/
X-Raym is offline   Reply With Quote
Old 10-16-2015, 06:51 AM   #4
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

X-Raym, yep, manipulating FXCHAIN_REC section in TrackStateChunk is only way to change monitor fx, unfortunately.
mpl is offline   Reply With Quote
Old 07-30-2020, 10:07 AM   #5
Yat
Human being with feelings
 
Join Date: Jan 2020
Posts: 3
Default

Quote:
Originally Posted by mpl View Post
X-Raym, yep, manipulating FXCHAIN_REC section in TrackStateChunk is only way to change monitor fx, unfortunately.
Sorry for digging up an old thread, but is it still the case?

... and could you maybe give more details about how to do that?

(I need in a reascript to disable the first monitor FX plugin and enable the second one)
Yat is offline   Reply With Quote
Old 07-30-2020, 10:26 AM   #6
Yat
Human being with feelings
 
Join Date: Jan 2020
Posts: 3
Default

Quote:
Originally Posted by Yat View Post
Sorry for digging up an old thread, but is it still the case?

... and could you maybe give more details about how to do that?

(I need in a reascript to disable the first monitor FX plugin and enable the second one)
I actually found a way to do this. If someone looks for this, here's how to do it (Lua):

local master_track = GetMasterTrack()
TrackFX_SetEnabled(master_track, 0x1000000, false)
TrackFX_SetEnabled(master_track, 0x1000001, true)
Yat is offline   Reply With Quote
Old 02-03-2021, 09:50 AM   #7
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,134
Default

Michail referred to FXCHAIN_REC section to access Monitor FX settings but there's no such section in the Master track chunk.

Do Monintor FX settings only live in the RAM and get written to the EXE file (don't know if it's possible)? Nothing seems to be saved to external .ini files

Last edited by Buy One; 02-03-2021 at 02:37 PM.
Buy One is offline   Reply With Quote
Old 02-03-2021, 03:12 PM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

According to AddByName api function doc, it seems that sometimes monitoring FX can be considered as Rec FX with master track (weird way to access it but I guess was more compatible with other API functions)


Quote:
Adds or queries the position of a named FX from the track FX chain (recFX=false) or record input FX/monitoring FX (recFX=true, monitoring FX are on master track).
Maybe it can works with the Get Track FX function by passing master track and trying to reach Rec FX with the trick from Yat
X-Raym is offline   Reply With Quote
Old 02-03-2021, 06:33 PM   #9
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

My Ultraschall-Api has functions for dealing with Master-Monitoring FXChains, including the more difficult to code ones.

RecFX for tracks are still missing (didn't know bout them til some days ago) but will be added shortly as well.

Doing it via Reaper's own API is in some ways edgecasey and weird in some functions.
__________________
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 02-04-2021, 04:27 AM   #10
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,134
Default

I was wrong. Thanks to Mespotine's hint and API found out that Monitor FX chunk is stored externally in reaper-hwoutfx.ini
Buy One is offline   Reply With Quote
Old 02-04-2021, 05:57 AM   #11
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

The trackfx for tracks 1 and higher however are stored in the TrackStateChunks as FXCHAIN_REC or something.
__________________
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 07-30-2021, 02:04 AM   #12
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 451
Default

Is this still restricted? I've been trying to read and write some parameters from an FX I put on the master track as an experiment. But it comes back with -1 for the read. And it doesn't look the write worked either. It looks like using gmem is the only way to set parameters externally and monitor them from a script. Shame as it looked neat doing it with parameters.
Hypex is offline   Reply With Quote
Old 07-30-2021, 05:53 AM   #13
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Quote:
Originally Posted by Hypex View Post
Is this still restricted? I've been trying to read and write some parameters from an FX I put on the master track as an experiment. But it comes back with -1 for the read. And it doesn't look the write worked either. It looks like using gmem is the only way to set parameters externally and monitor them from a script. Shame as it looked neat doing it with parameters.
Catch monitor fx as Input FX for Master track (see API help for details about how to catch input FX). I rememmber also copy/delete functions also support this.

Last edited by mpl; 07-30-2021 at 06:00 AM.
mpl is offline   Reply With Quote
Old 07-30-2021, 07:23 AM   #14
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 451
Default

Quote:
Originally Posted by mpl View Post
Catch monitor fx as Input FX for Master track (see API help for details about how to catch input FX). I rememmber also copy/delete functions also support this.

Thanks but I can't get it to work. I read through the docs but my code is still faulty. This is what I'm currently testing.


Code:
  FX = TrackFX_AddByName(Track, Name, 0, 1);
  FX >= 0 ?
  (
    MFX = FX + $x1000000;
    TrackFX_SetParam(Track, MFX, 16, 0);
    TrackFX_Show(Track, FX, 3);

    Return = TrackFX_GetParam(Track, MFX, 16, ReturnLo, ReturnHi);
I tried with and without monitoring FX set in TrackFX_AddByName() but still couldn't read any different. And I had to turn it off because it kept opening up another FX on the track which didn't make sense. Should I add $x1000000 to all FX I use as index to functions?
Hypex is offline   Reply With Quote
Old 07-31-2021, 08:00 AM   #15
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 451
Default

I thought I had it working but I can't get it back. I was checking in a defer loop which overcomplicates it because it keeps dropping out and looping main(). In any case it's unsuitable as I don't want to run it as monitor FX but merely send and receive parameters which doesn't look possible for a basic JSFX sitting on the master.

Last edited by Hypex; 07-31-2021 at 04:42 PM.
Hypex is offline   Reply With Quote
Old 10-07-2021, 05:55 PM   #16
pandabot
Human being with feelings
 
pandabot's Avatar
 
Join Date: Oct 2018
Posts: 367
Default

Quote:
Originally Posted by cfillion
fx_index|0x1000000 on the master track for accessing effects on the monitoring chain
The monitoring fx chain is considered to be the input fx chain of the master track, so add "|0x1000000" after your fx index. For example I made some scripts for increasing/decreasing monitoring volume here https://github.com/benjohnson2001/ra...trollerScripts
pandabot 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 01:05 PM.


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