From 68218aa5b29774165842eb804f306a2f5a32b7ad Mon Sep 17 00:00:00 2001 From: junh1024 Date: Thu, 13 May 2021 20:10:51 +1300 Subject: [PATCH] new Circle+ mode in 5>7 upmix --- Converters/5.1 to 7.1 Upmix V3 (L).txt | 96 ++++++++++++++++++-------- Panners/7.1 Mono Panner.txt | 2 +- Specialist/FFT Multi Tool (L).txt | 9 +-- 3 files changed, 74 insertions(+), 33 deletions(-) diff --git a/Converters/5.1 to 7.1 Upmix V3 (L).txt b/Converters/5.1 to 7.1 Upmix V3 (L).txt index b53bbd2..565d48b 100644 --- a/Converters/5.1 to 7.1 Upmix V3 (L).txt +++ b/Converters/5.1 to 7.1 Upmix V3 (L).txt @@ -2,7 +2,7 @@ desc: 5.1 to 7.1 FFT upmix. in BETA -slider1:1<0,1,1{Square (Cine-auto thresholds),Circle (ITU), Circle+ (ITU)}>Mode +slider1:1<0,1,1{Square (Cine-auto thresholds),Circle (ITU),Circle+ (ITU)}>Mode slider2:100<0,200,1>Amount (%) slider3:50<0,100,1>Side threshold slider4:100<0,100,1>Crossover width @@ -162,34 +162,74 @@ pos >= fftsize ? ): ( - // circle mode - mid_r = (left_r_two+right_r_two)*0.5; - mid_i = (left_i_two+right_i_two)*0.5; - side_r = (left_r_two-right_r_two)*0.5; - side_i = (left_i_two-right_i_two)*0.5; + mode==2? + ( + // circle mode + mid_r = (left_r_two+right_r_two)*0.5; + mid_i = (left_i_two+right_i_two)*0.5; + side_r = (left_r_two-right_r_two)*0.5; + side_i = (left_i_two-right_i_two)*0.5; + + // Magnitudes3[i]=sqrt(left_r_two^2+left_i_two^2); + // Magnitudes4[i]=sqrt(right_r_two^2+right_i_two^2); + + // compute pan + // p2=abs(Magnitudes4[i]-Magnitudes3[i])/(Magnitudes4[i]+Magnitudes3[i]) + + ms_complex_set_sideness_center(); + // Sideness1[i]=1; + + S_scaling= min(max( ( 1-(Sideness1[i]-Side_threshold+(Crossover_width/2))*(1/Crossover_width) ) ,0) ,1) ; + + l2r2_complex_apply_1_scaling(S_scaling*Amount); + + + inspector1=Sideness1[i]; + inspector2=S_scaling; - // Magnitudes3[i]=sqrt(left_r_two^2+left_i_two^2); - // Magnitudes4[i]=sqrt(right_r_two^2+right_i_two^2); - - // compute pan - // p2=abs(Magnitudes4[i]-Magnitudes3[i])/(Magnitudes4[i]+Magnitudes3[i]) - - ms_complex_set_sideness_center(); - // Sideness1[i]=1; - - S_scaling= min(max( ( 1-(Sideness1[i]-Side_threshold+(Crossover_width/2))*(1/Crossover_width) ) ,0) ,1) ; - - l2r2_complex_apply_1_scaling(S_scaling*Amount); - - - inspector1=Sideness1[i]; - inspector2=S_scaling; - - buf1_a[a] = left_r_two - right_i_two; - buf1_a[b] = left_i_two + right_r_two; - buf1_a[a2] = left_r_two + right_i_two; - buf1_a[b2] = right_r_two - left_i_two; - + buf1_a[a] = left_r_two - right_i_two; + buf1_a[b] = left_i_two + right_r_two; + buf1_a[a2] = left_r_two + right_i_two; + buf1_a[b2] = right_r_two - left_i_two; + ) + : + ( + //Circle+ discrete mode by analyzing all 4 ch + m1=Magnitudes1[i]=sqrt(left_r^2+left_i^2); //+very_small_number*0.1 + m2=Magnitudes2[i]=sqrt(right_r^2+right_i^2); + m3=Magnitudes3[i]=sqrt(left_r_two^2+left_i_two^2); + m4=Magnitudes4[i]=sqrt(right_r_two^2+right_i_two^2); + + //how loud rear is compared to front + p1=m3/(m1+m3); + p2=m4/(m2+m4); + + /* + rear output (vert axis) as fn of p1 depth pan at defaults + ^(1) + | / + |__/ + ----(1)> + */ + + + Rear_thresh=100-slider3; + + //turn down rear if also in front aka move to sides + //Rear_thresh/50 = 1 @ defaults + L_scaling=max( p1*2 -(Rear_thresh/50) ,0); + R_scaling=max( p2*2 -(Rear_thresh/50) ,0); + + left_r_two *=L_scaling; + left_i_two *=L_scaling; + right_r_two*=R_scaling; + right_i_two*=R_scaling; + + buf1_a[a] = left_r_two - right_i_two; + buf1_a[b] = left_i_two + right_r_two; + buf1_a[a2] = left_r_two + right_i_two; + buf1_a[b2] = right_r_two - left_i_two; + ) ); diff --git a/Panners/7.1 Mono Panner.txt b/Panners/7.1 Mono Panner.txt index f659753..c88e976 100644 --- a/Panners/7.1 Mono Panner.txt +++ b/Panners/7.1 Mono Panner.txt @@ -1,4 +1,4 @@ -desc: mono to 7.1 panner +desc: mono to 7.1 panner (phantom center) slider1:0<-180,180,1>the pan (deg) diff --git a/Specialist/FFT Multi Tool (L).txt b/Specialist/FFT Multi Tool (L).txt index 5e4c930..c6d3e46 100644 --- a/Specialist/FFT Multi Tool (L).txt +++ b/Specialist/FFT Multi Tool (L).txt @@ -347,18 +347,19 @@ 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,V2 with Square & Circle modes -// 51>71 upscale V3 with 4ch discrete mode +// Unified 51>71 upscale V1 // 51>91h upscale modes(discrete SFX+?) // 51>20 downmix V3 FFT -// 2>15 mono pan, no pan law for height +// 2>15 mono pan, no pan law for height, nicer 71 mode // ambisonics 40 V2,3 decoder, microphone tool V3 in FFT // cutoff behavior depends on mode, bypass/silence -// migrate FFT tools back to old 50% infrastructure fore less artefacts // sustain designer amount // log freq gfx display // check silence fn test magnitude, cleanup, buf vars // surround layout converter +// 15.1 surround visualizer w/bias ball +// coordinate automation tool (convert btw cubular & circular) +// lfo automation tool, better than PMOD in RPR cuz it has offset //more voodoo buf1_a[a] = left_r - right_i;