Old 08-18-2019, 10:56 AM   #1
pandabot
Human being with feelings
 
pandabot's Avatar
 
Join Date: Oct 2018
Posts: 367
Default jsfx plugin to swap left and right channels

Is there a plugin to swap left and right channels? I primarily mix on headphones and would like to compensate for differences in headphone tolerances between the speakers by swapping channels on the master track as a check.

This problem is discussed here https://youtu.be/XUx8nDiiZqk?t=177
pandabot is offline   Reply With Quote
Old 08-18-2019, 12:05 PM   #2
pandabot
Human being with feelings
 
pandabot's Avatar
 
Join Date: Oct 2018
Posts: 367
Default

Hmmmm maybe "JS: Stereo Channel Volume/Pan/Polarity Control" is a good option, can also adjust levels if one driver is louder than the other
pandabot is offline   Reply With Quote
Old 08-18-2019, 12:10 PM   #3
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Found this jsfx, says Swaps the left and right stereo channels...
https://forum.cockos.com/showpost.ph...77&postcount=7
Edgemeal is offline   Reply With Quote
Old 08-18-2019, 02:10 PM   #4
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,417
Default

Quote:
Originally Posted by Edgemeal View Post
Found this jsfx, says Swaps the left and right stereo channels...
https://forum.cockos.com/showpost.ph...77&postcount=7
I was just about to write a short JSFX to do exactly this, but then I clicked the link and found out that I already had! In 2009. Time travel
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 08-18-2019, 09:37 PM   #5
pandabot
Human being with feelings
 
pandabot's Avatar
 
Join Date: Oct 2018
Posts: 367
Default

Hey very nice :-)

Somebody should throw it in Reapack

👃👈

Last edited by pandabot; 08-19-2019 at 10:22 PM. Reason: not it
pandabot is offline   Reply With Quote
Old 10-21-2021, 11:35 AM   #6
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,417
Default

Quote:
Originally Posted by Fabian View Post
I was just about to write a short JSFX to do exactly this, but then I clicked the link and found out that I already had! In 2009. Time travel
Today I went ahead and coded a version of this that allows you to swap back and forth with a mouse click.

Code:
desc: MF/StereoSwapper II
//tags: swapping the stereo channels
//author: M Fabian

slider1:0<0,1,1{L-R,R-L}>Stereo

in_pin:input 1
in_pin:input 2
out_pin:output L
out_pin:output R

@init
do_swap = 0;
str_L = "<< L";
str_R = "R >>";
////////////////////////////////////////////////////////////////////////////////
@slider
swapped = slider1;
////////////////////////////////////////////////////////////////////////////////
@sample
in_L = spl0;
in_R = spl1;
spl0 = in_L * (1-swapped) + in_R * swapped;
spl1 = in_R * (1-swapped) + in_L * swapped;
// swapped ? ( spl0 = in_R; spl1 = in_L; ):( spl0 = in_L; spl1 = in_R; );
////////////////////////////////////////////////////////////////////////////////      
@gfx 200 50
 
  gfx_r = 0.0;
  gfx_g = 1.0;
  gfx_b = 0.0;
  gfx_a = 1;

 swapped ?
 (
    str_L = "<< R";
    str_R = "L >>";
    
 ):(
    str_L = "<< L";
    str_R = "R >>"; 
 );
 
 gfx_x = 2;
 gfx_y = 2;
 gfx_drawstr(str_L);
 
 gfx_measurestr(str_R, str_w, str_h);
 gfx_x = gfx_w - 2 - str_w;
 gfx_y = 2;
 gfx_drawstr(str_R);
 
  (mouse_cap & 1) && !(mouse_old & 1) ?
  (
    mouse_x >= 0 && 
    mouse_x <= gfx_w && 
    mouse_y >= 0 && 
    mouse_y <= gfx_w ? do_swap = 1;
  );
  
  mouse_old = mouse_cap;
  
  do_swap ?
  (
      slider1 = 1 - slider1;
      swapped = slider1;
      do_swap = 0;
  );
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 10-21-2021, 05:32 PM   #7
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,272
Default

The width knob on the master track will do it, but I guess that’s not convenient enough? Literally any plugin will do it - for example the JS Channel Mapper, just by swapping either input or output pins. Bypass it for normal. Activate to swap.

The plugin above is elegant, but total overkill.
ashcat_lt is online now   Reply With Quote
Old 10-22-2021, 10:20 AM   #8
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,417
Default

Quote:
Originally Posted by ashcat_lt View Post
The width knob on the master track will do it, but I guess that’s not convenient enough? Literally any plugin will do it - for example the JS Channel Mapper, just by swapping either input or output pins. Bypass it for normal. Activate to swap.
I expected stereo swap to be on the master's right-click Stereo menu, but there are only variants of mono there. So I wanted a convenient non-intrusive way to do it, and and it takes up only two slots embedded on the MCP master track.

Quote:
Originally Posted by ashcat_lt View Post
The plugin above is elegant, but total overkill.
Not for me.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 10-22-2021, 11:37 AM   #9
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Quote:
Originally Posted by Fabian View Post
I expected stereo swap to be on the master's right-click Stereo menu, but there are only variants of mono there. So I wanted a convenient non-intrusive way to do it
This lua script toggle swap master channels in a single shortcut without any jsfx (as mentioned above, it cycle master width between 100% and -100%):

Code:
tr =  reaper.GetMasterTrack( proj )
reaper.SetMediaTrackInfo_Value( tr, 'I_PANMODE', 5  )
D_WIDTH = reaper.GetMediaTrackInfo_Value( tr, 'D_WIDTH'  )
if D_WIDTH > 0 then reaper.SetMediaTrackInfo_Value( tr, 'D_WIDTH', -1) else reaper.SetMediaTrackInfo_Value( tr, 'D_WIDTH', 1) end
mpl is offline   Reply With Quote
Old 10-24-2021, 12:03 PM   #10
rafa1981
Human being with feelings
 
Join Date: Feb 2008
Posts: 188
Default

MixMaxtrix can channel swap, among many other things. It was initially made for these duties.


https://www.kvraudio.com/product/mixmaxtrix-by-artv
rafa1981 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 03:46 PM.


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