From 3b87e6a323ed9309e6eda4ab144304b55461389d Mon Sep 17 00:00:00 2001 From: junh1024 Date: Mon, 17 May 2021 22:25:28 +1300 Subject: [PATCH] new Multi Mix Convert --- Converters/15.1 to 22.2 Upmix (U).txt | 77 ---- Converters/Multi Mix Convert (L).txt | 466 +++++++++++++++++++++++++ Panners/1.0 to 15.1 Panner GUI (L).txt | 2 +- README.md | 8 +- 4 files changed, 470 insertions(+), 83 deletions(-) delete mode 100644 Converters/15.1 to 22.2 Upmix (U).txt create mode 100644 Converters/Multi Mix Convert (L).txt diff --git a/Converters/15.1 to 22.2 Upmix (U).txt b/Converters/15.1 to 22.2 Upmix (U).txt deleted file mode 100644 index ac2ba1f..0000000 --- a/Converters/15.1 to 22.2 Upmix (U).txt +++ /dev/null @@ -1,77 +0,0 @@ -desc: Simple 15.1 to 22.2 upmix. Chan order courtesy of blue ripple. - -// 1. Front Left -// 2. Front Right -// 3. Front Centre -// 4. LFE Left -// 5. Back Left -// 6. Back Right -// 7. Front Left/Centre -// 8. Front Right/Centre -// 9. Back Centre -// 10. LFE Right -// 11. Side Left -// 12. Side Right -// 13. Top Front Left -// 14. Top Front Right -// 15. Top Front Centre -// 16. Top Centre -// 17. Top Back Left -// 18. Top Back Right -// 19. Top Side Left -// 20. Top Side Right -// 21. Top Back Centre -// 22. Bottom Front Centre -// 23. Bottom Front Left -// 24. Bottom Front Right - -@init -// two_to_three_coeff_lg=0.9; -// two_to_three_coeff_sm=0.47; //applied recursively from above, magic number to make equal power since -two_to_three_coeff_lg=0.95; -two_to_three_coeff_sm=0.32; //applied recursively from above, magic number to make equal power since - -@sample -//Order of ops v.important -spl22=spl10*two_to_three_coeff_lg; //. Bottom Front Left -spl23=spl11*two_to_three_coeff_lg; //. Bottom Front Right -spl21=(spl22+spl23)*two_to_three_coeff_sm; //. Bottom Front Centre - - -spl18=spl14 *1;//. Top Side Left -spl19=spl15 *1;//. Top Side Right -spl15=0; //. Top Centre not used since would narrow/distort 15.1 image - -spl16=spl12*two_to_three_coeff_lg; //. Top Back Left -spl17=spl13*two_to_three_coeff_lg; //. Top Back Right -spl20=(spl16+spl17)*two_to_three_coeff_sm; //. Top Back Centre - -spl12=spl8*two_to_three_coeff_lg; //. Top Front Left -spl13=spl9*two_to_three_coeff_lg; //. Top Front Right -spl14=(spl12+spl13)*two_to_three_coeff_sm; //. Top Front Centre - - - - -spl10=spl6; //. Side Left -spl11=spl7; //. Side Right - -spl0 =spl0*0.7; // Front Left -spl1 =spl1*0.7; // Front Right -spl2 =spl2; // Front Centre -spl6 =spl0; // Front Left/Centre -spl7 =spl1; // Front Right/Centre - -spl4 =spl4*two_to_three_coeff_lg; // Back Left -spl5 =spl5*two_to_three_coeff_lg; // Back Right -spl8 =(spl4+spl5)*two_to_three_coeff_sm; // Back Centre - - - -spl3 =spl3*0.7; // LFE Left -spl9 =spl3; //. LFE Right - - - - - diff --git a/Converters/Multi Mix Convert (L).txt b/Converters/Multi Mix Convert (L).txt new file mode 100644 index 0000000..427a5bf --- /dev/null +++ b/Converters/Multi Mix Convert (L).txt @@ -0,0 +1,466 @@ +// 1 +// 2 +// x +// quad +// 51film +// 51smpte +// 512 +// 71b +// 514 +// 712 +// 714dts +// 714mph +// 716au +// 914dts +// 916am +// 15.1 +// 8.1.4.4 +// 18x +// 19 +// 20 +// 21 +// 22 +// 23 +// 22.2NHK. + + + +desc:Multi-format surround converter in ALPHA. Pan law -3dB. + +// s1 input +// s2 output +// s3 Hi Hi +// s4 ell hi +// s5 tsd +// s6 sd +// s7 front width +// s8 rw +// s9 center content +// s10 upmix + + +slider1:15<0,23,1{x,2.0 Stereo,x,4.0 Quad,5.1/3.0 (Film),5.1 (SMPTE),5.1.2 (SMPTE),7.1 (SMPTE-MS),5.1.4/5.1.6 Auro-3D (SMPTE),7.1.2/7.1 Atmos Base (SMPTE-Dolby),7.1.4/7.1 DTS-X (SMPTE-Dolby),7.1.4/7.1 MPEG-H (SMPTE-MS),13,14,9.1.6 Atmos CBA (SMPTE-Dolby),15.1 junh1024 (SMPTE-MS),17,18,19,20,21,22,23,22.2 NHK}>Input layout +slider2:14<0,23,1{x,2.0 Stereo,x,4,5,5.1 (SMPTE),5.1.2 (SMPTE),7.1 (SMPTE-MS),5.1.4/5.1.6 Auro-3D (SMPTE),7.1.2/7.1 Atmos Base (SMPTE-Dolby),7.1.4/7.1 DTS-X (SMPTE-Dolby),7.1.4/7.1 MPEG-H (SMPTE-MS),13,14,9.1.6 Atmos CBA (SMPTE-Dolby),15.1 junh1024 (SMPTE-MS),17,18,19,20,21,22,23,22.2 NHK}>Output layout +slider3:75<0,100 ,1>Height height +slider4:0<0,100 ,1>ELL height +slider5:0<-100,100,1>Top Side Depth (+ve is front) +slider6:0<-100,100,1>Side Depth (+ve is front) + +slider7:100<0,100,10>Front Width (Disabled) +slider8:100<0,100,10>Rear Width +slider9:0<-100,100,10>Center Content (Disabled) +slider10:0 <0,100,10>Fill for 22.2 (Disabled) + +import surroundlib1.txt +import surroundlib2.txt +import surroundlib3.txt + +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in +in_pin:in + +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out +out_pin:out + + +@init +back_L=back_R=0; + +mode_in=mode_out=0; + +@slider +ELL_side_exists=Top_side_exists=0; + +Height_height=slider3/100; +Height_height_TS=(100-((100-slider3)*0.75))/100; + +R_width_coeff=slider8/100; + +mode_in=slider1+1; +mode_out=slider2+1; + +// mode_out>2?(ELL_side_exists=1;); +// mode_out%2==1?(Top_side_exists=1;); +(mode_out==7||mode_out==10||mode_out==15||mode_out==16||mode_out==24)?Top_side_exists=1; + +(mode_out==8||mode_out>=10)?ELL_side_exists=1; + +(mode_out==16||mode_out==24)?Bottom_exists=1; + +@sample + +//40quad +mode_in==4? +( + spl4=spl2; + spl5=spl3; + spl2=spl3=0; +); + +//51 film +mode_in==5? +( + in0 = spl0 ; + in1 = spl1 ; + in2 = spl2 ; + in3 = spl3 ; + in4 = spl4 ; + in5 = spl5 ; + + spl0 = in0 ; + spl1 = in2 ; + spl2 = in1 ; + spl3 = in5 ; + spl4 = in3 ; + spl5 = in4 ; +); + +//512 +mode_in==7? +( + spl14 =spl6; + spl15 =spl7; + + + spl6 =0; + spl7 =0; + +); + +//514/516 +mode_in==9? +( + spl12 =spl8; + spl13 =spl9; + + //add tc + spl8=spl6+(spl10*0.7); + spl9=spl7+(spl10*0.7); + + spl6=0; + spl7=0; + + //add oh + spl14 =spl11*0.7; + spl15 =spl11*0.7; + +); + + +//712 +mode_in==10? +( + spl14 =spl8; + spl15 =spl9; + + spl8 =0; + spl9 =0; + + swap_Side_Back_ELL(); +); + +//714 +mode_in==11||mode_in==12? +( + spl12 =spl10; + spl13 =spl11; + + spl10= spl11=0 ; + + mode_in==11?swap_Side_Back_ELL(); +); + +//916 +mode_in==15? +( + // abs(1); + swap_Side_Back_ELL(); + + temp14=spl14; + temp15=spl15 ; + //swap TB & TS + spl14= spl12; + spl15= spl13; + spl12= temp14; + spl13= temp15; + + //downmix Wide + spl0+=spl8*0.7; + spl1+=spl9*0.7; + spl6+=spl8*0.7; + spl7+=spl9*0.7; + + //remap TF + spl8= spl10; + spl9= spl11; + + spl10=spl11=0; + +); + +mode_in==24? +( + //LFE + spl3=(spl3+spl9)*0.5; + + //add BC + spl4 +=spl8*0.7; + spl5 +=spl8*0.7; + + //add FC + spl0 +=spl6*0.6; + spl1 +=spl7*0.6; + spl2+=(spl6+spl7)*0.6; + + //Side + spl6=spl10; //SL + spl7=spl11; //SR + + //Top + spl8=spl12+(spl14*0.7); + spl9=spl13+(spl14*0.7); + + //TB + spl12= spl16 +(spl20*0.7); + spl13= spl17 +(spl20*0.7); + + //TS + spl14= spl18+(spl15*0.7 ); + spl15= spl19+(spl15*0.7 ); + + //Bt + spl10= spl22 +(spl21*0.7); + spl11= spl23 +(spl21*0.7); + +); + +mode_out==2? +( + //faster than a loop + spl0+=(spl2*0.71)+spl4+spl6+spl8+spl10+spl12+spl14; + spl1+=(spl2*0.71)+spl5+spl7+spl9+spl11+spl13+spl15; + + // i=4; + + // loop(6, + // spl0+=spl(i); + // spl1+=spl(i+1); + // i+=2; + // ); + + silence_top_layer_151(); + spl2=spl3=spl4=spl5=spl6=spl7=0; + +); + +Bottom_exists==0? +( + //bottom into LR + spl0 += spl10; + spl1 += spl11; + spl10=0; + spl11=0; +); + +//Rear width +rear_width(R_width_coeff); + +//height side depth +// Top_Side_Depth_71_to_51(Top_Side_Depth); + +(ELL_side_exists)? +( + ELL_Side_Depth_71_to_71(slider6/100); +) +: +( + //silence spl6-7? + ELL_Side_Depth_71_to_51( ( slider6 +100)/ 200 ); + inspector1=( slider6 +100)/ 200; +); + +(Top_side_exists)? +( + Top_Side_Depth_71_to_71(slider5/100); +) +: +( + Top_Side_Depth_71_to_51( (slider5 +100)/ 200 ); +); + +//51b +mode_out==6? +( + downmix_151_71_v1(); + silence_top_layer_151(); + spl6=0; + spl7=0; + +); + +//512sh +mode_out==7? +( + spl6=0; + spl7=0; + Height_height_adj_v1(Height_height); + do_side_physical_level(0); + spl6=heightsL; + spl7=heightsR; + silence_top_layer_151() ; +); + +//71b +mode_out==8? +( + downmix_151_71_v1(); + silence_top_layer_151(); +); + + + +//514h +mode_out==9? +( + spl6 = spl8; + spl7 = spl9; + + spl8 = spl12; + spl9 = spl13; + + spl10=spl11=spl12=spl13=spl14=spl15=0; +); + + +//712sh +mode_out==10? +( + + Height_height_adj_v1(Height_height); + silence_top_layer_151() ; + spl8=heightsL; + spl9=heightsR; + swap_Side_Back_ELL(); +); + +//714h +(mode_out==11||mode_out==12)? +( + (mode_out==11)?swap_Side_Back_ELL(); + + spl10= spl12; + spl11= spl13; + + spl12=spl13=spl14=spl15=0; +); + +//916 +mode_out==15? +( + // abs(1); + swap_Side_Back_ELL(); + + //remap TF + spl10=spl8; + spl11=spl9; + + + //use as temp for below + spl8=spl12; + spl9=spl13; + + //swap TB & TS + spl12=spl14; + spl13=spl15; + spl14= spl8; + spl15= spl9; + + spl8=0; + spl9=0; + +); + +//22.2 +mode_out==24? +( + //Order of ops v.important + spl22=spl10*1; // BtL + spl23=spl11*1; // BtR + spl21=(spl22+spl23)*0; // BtC + + spl18=spl14 *1;// TSL + spl19=spl15 *1;// TSR + spl15=0; // OH not used since would narrow/distort 15.1 image + + spl16=spl12*1; // TBL + spl17=spl13*1; // TBR + spl20=(spl16+spl17)*0; // TBC + + spl12=spl8*1; // TL + spl13=spl9*1; // TR + spl14=(spl12+spl13)*0; // TC + + spl10=spl6; //SL + spl11=spl7; //SR + + spl0 =spl0*1; //L + spl1 =spl1*1; //R + spl2 =spl2; //C + spl6 =spl0*0; //LC + spl7 =spl1*0; //RC + + spl4 =spl4*1; //BL + spl5 =spl5*1; //BR + spl8 =(spl4+spl5)*1; //BC + + spl3 =spl3*0.5; // LFE L + spl9 =spl3*0.5; // LFE R + +); 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 194f20c..7619535 100644 --- a/Panners/1.0 to 15.1 Panner GUI (L).txt +++ b/Panners/1.0 to 15.1 Panner GUI (L).txt @@ -135,7 +135,7 @@ slider7==0 &&slider3<100 ? //activate only in 2D & close panning spl4*= slider3/100 ; spl5*= slider3/100 ; - downmix_151_71_v1(); + // downmix_151_71_v1(); ); slider7==1 &&slider3<100? //activate only in 3D & top panning diff --git a/README.md b/README.md index 97ee492..6ce93bb 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,7 @@ Quick start/Example workflow tools * 1.0 to 15.1 Panner GUI (L).txt for mono sources - 2.0 to 15.1 Mapper (M).txt for stereo sources * 5.1 to 3D Upmix (L).txt -* 15.1 to 3D Downmix (M).txt -* 15.1 to 5.1 Downmix (M).txt +* Multi Mix Convert (L).txt ### FUMA Ambisonics workflow: @@ -84,7 +83,7 @@ Panners --- - 3.1 Panner (M).txt: 3.0 front surround panner, with width control. Move & Copy actions are supported for LFE use, and Mixing & Monitoring modes for a total of 4 combinations. The specification for LFE in digital mixes, is to gain it by 10dB on playback. Hence while mixing, it is gained by -10dB. For monitoring, this is not applied. - 1.0 to 5.1 Panner GUI (L).txt -- 1.0 to 15.1 Panner GUI (M).txt +- 1.0 to 15.1 Panner GUI (L).txt - 2.0 to 15.1 Mapper (M).txt - 7.1 to 15.1 Height Panner v2 (M).txt @@ -116,7 +115,6 @@ Upmixers are considered experimental & are based on matrixes. It's advisable to - Pan Slice: the pan slider - Function Designer: view the shape of the above mode - 6.1 to 7.1 Upmix (M).txt -- 15.1 to 22.2 Upmix (U).txt Manipulators --- @@ -131,7 +129,7 @@ Downmixers - 7.1 to 5.1 Downmix (M).txt - 15.1 to 5.1 Downmix (M).txt - 15.1 to 7.1 Downmix (S).txt -- 15.1 to 3D Downmix (M).txt for Auro3D & AMBEO 5.1.4, Atmos Base 7.1.2, DTS-X Base & MPEG-H 7.1.4, and Atmos 9.1.6 +- Multi Mix Convert (L).txt for 5.1, 7.1, 5.1.2, Auro3D & AMBEO 5.1.4, Atmos Base 7.1.2, DTS-X Base & MPEG-H 7.1.4, Atmos 9.1.6, and 22.2 NHK. It internally converts to 15.1 so speakers which aren't in 15.1 will get downmixed. - 15.1 to 8.0 Speaker Tool (M).txt (8.0h Order: L R, HL HR, BL BR, SL SR, which is similar & backwards compatible with SMPTE-MS 7.1, for 3D surround playback using commonly available 7.1 sound cards) ![8.0sh](https://i.imgur.com/1nivgkz.png)