From 46a222150462c0ba1be7d5d7dc47157c41d2a015 Mon Sep 17 00:00:00 2001 From: junh1024 Date: Mon, 17 May 2021 16:07:54 +1300 Subject: [PATCH] new script, better 7.1 panning in 15.1 GUI panner --- Panners/1.0 to 15.1 Panner GUI (L).txt | 35 +++++++++++++++++----- Scripts/Reverse Take Pan.py | 40 ++++++++++++++++++++++++++ Specialist/FFT Multi Tool (L).txt | 4 +-- 3 files changed, 70 insertions(+), 9 deletions(-) create mode 100644 Scripts/Reverse Take Pan.py diff --git a/Panners/1.0 to 15.1 Panner GUI (L).txt b/Panners/1.0 to 15.1 Panner GUI (L).txt index f0a9e5c..194f20c 100644 --- a/Panners/1.0 to 15.1 Panner GUI (L).txt +++ b/Panners/1.0 to 15.1 Panner GUI (L).txt @@ -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 @@ -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); @@ -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 ; @@ -212,7 +226,7 @@ slider7>0? ( gfx_g = gfx_b = 0; gfx_r = 0.8; -); + height_toe_in=gfx_w/20; @@ -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 */ ) ? @@ -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; ): ( @@ -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 ; diff --git a/Scripts/Reverse Take Pan.py b/Scripts/Reverse Take Pan.py new file mode 100644 index 0000000..6ef9d74 --- /dev/null +++ b/Scripts/Reverse Take Pan.py @@ -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 ) + diff --git a/Specialist/FFT Multi Tool (L).txt b/Specialist/FFT Multi Tool (L).txt index c6d3e46..e40e3e9 100644 --- a/Specialist/FFT Multi Tool (L).txt +++ b/Specialist/FFT Multi Tool (L).txt @@ -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