Skip to content

Commit

Permalink
new script, better 7.1 panning in 15.1 GUI panner
Browse files Browse the repository at this point in the history
  • Loading branch information
junh1024 committed May 17, 2021
1 parent 68218aa commit 46a2221
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 9 deletions.
35 changes: 28 additions & 7 deletions Panners/1.0 to 15.1 Panner GUI (L).txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ import surroundlib3.txt

in_pin:mono
in_pin:mono
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank
in_pin:blank

out_pin:L
out_pin:R
Expand Down Expand Up @@ -60,7 +74,7 @@ function do_slider_stuff()
center_coeff_forced_width=max(1-(abs(slider1)/30),0);

// conv polar to cart for displ automation
(slider7==0)?(height_temp=100;):(height_temp=slider2;);
(slider7==0)?(height_temp=-slider3+100;):(height_temp=slider2;);
temp_rad=(155-((100-slider3)/1.8+ height_temp))/(155*2);
temp_theta=(slider1*$pi/180)+$pi/2;
new_x=-cos(temp_theta)*temp_rad*gfx_w+(gfx_w/2);
Expand Down Expand Up @@ -113,8 +127,8 @@ slider7==0 &&slider3<100 ? //activate only in 2D & close panning

//ell depth bleed for ell panning

spl16 += (spl0+spl4) * (100-slider3 )/100 ;
spl17 += (spl1+spl5) * (100-slider3 )/100 ;
spl6 += (spl0+spl4) * (100-slider3 )/100 ;
spl7 += (spl1+spl5) * (100-slider3 )/100 ;

spl0 *= slider3/100 ;
spl1 *= slider3/100 ;
Expand Down Expand Up @@ -212,7 +226,7 @@ slider7>0?
(
gfx_g = gfx_b = 0;
gfx_r = 0.8;
);


height_toe_in=gfx_w/20;

Expand All @@ -226,7 +240,7 @@ drawbox(gfx_w*2/3-height_toe_in,gfx_h*2/3);
drawbox(gfx_w/3-height_toe_in/2,gfx_h/2);
drawbox(gfx_w*2/3+height_toe_in/2,gfx_h/2);


);

//if mouse is within threshold of pan knob
(mouse_cap ==1 /*&& mouse_x >=pan_x-box_width*pan_thresh && mouse_y >= pan_y -box_width*pan_thresh && mouse_x <=pan_x+box_width*pan_thresh && mouse_y <= pan_y +box_width*pan_thresh */ ) ?
Expand All @@ -249,7 +263,7 @@ drawbox(gfx_w*2/3+height_toe_in/2,gfx_h/2);

slider2>100? //width to emulate top pan
(
slider3=floor(min(100-(slider2-100)*1.8,100));
slider3=min(100-(slider2-100)*1.8,100);
slider2=100;
):
(
Expand All @@ -261,7 +275,14 @@ drawbox(gfx_w*2/3+height_toe_in/2,gfx_h/2);
slider2=max(0,slider2) // restrict bottom panning to front
);

slider7<1?(slider2=0;);// restrict height panning to 3D

slider7<1?
(
slider2=0;// restrict height panning to 3D
slider3=min(100*(rad/0.24),100); // Width reduction applies to whole area in 7.1
);

slider3=floor(slider3); //round width

ELL_W=slider3/100 ;
top_W=slider3/100 ;
Expand Down
40 changes: 40 additions & 0 deletions Scripts/Reverse Take Pan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
desc=""
by="junh1024"

from reaper_python import *
from contextlib import contextmanager

@contextmanager
def undoable(message):
RPR_Undo_BeginBlock2(0)
try:
yield
finally:
RPR_Undo_EndBlock2(0, message, -1)

debug = True

def msg(m):
if 'debug' in globals():
RPR_ShowConsoleMsg(m)

# msg(RPR_CountSelectedMediaItems(0))

with undoable(desc):
# RPR_ShowConsoleMsg(BPM_proj)

#get file BPM
# dialogstring="amount"
# theoffset = RPR_GetUserInputs("Adjust take by how many semitones?",1,dialogstring,"",64)[4]
# theoffset = float(theoffset.strip())
# RPR_ShowConsoleMsg(new_gain_bits)

#get items
for i in range (RPR_CountSelectedMediaItems( 0)):
MI=RPR_GetSelectedMediaItem(0,i)

# set gain
take=RPR_GetActiveTake(MI)
original=RPR_GetMediaItemTakeInfo_Value( take, "D_PAN" )
RPR_SetMediaItemTakeInfo_Value( take, "D_PAN", -original )

4 changes: 2 additions & 2 deletions Specialist/FFT Multi Tool (L).txt
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ pos >= fftsize ?
// block stereo tool: m/s compress & centerizer
// SURROUND===
// Unify "2.0 to 3.0 Width (M)" & "3.0 Spread Control (U)"
// Unified 51>71 upscale V1
// Unified 51>71 upscale V1, V2 with modes
// 51>91h upscale modes(discrete SFX+?)
// 51>20 downmix V3 FFT
// 2>15 mono pan, no pan law for height, nicer 71 mode
// 2>15 mono pan, no pan law for height
// ambisonics 40 V2,3 decoder, microphone tool V3 in FFT
// cutoff behavior depends on mode, bypass/silence
// sustain designer amount
Expand Down

0 comments on commit 46a2221

Please sign in to comment.