Advertisement
junh1024

ambi test

Jan 6th, 2017
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. desc: codec test
  2.  
  3. //based on http://www.blueripplesound.com/decoding
  4. slider1:0<0,1,1{Encode,Decode}>Mode
  5. slider2:1<0,2,0.05>Z depth
  6.  
  7. @sample
  8.  
  9. //encode
  10.  
  11. // W=whole
  12. // X=Width DIffrence
  13. // Z=Depth difference
  14.  
  15. // spl0=channel 1, Front Left
  16. // spl5=channel 6, Back RIght
  17.  
  18. slider1==0?(
  19. W=(spl0*0.5)+(spl1*0.5  )+(spl4*0.5)+(spl5*0.5);
  20. X=(spl0*0.5)+(spl1*-0.5 )+(spl4*0.5)+(spl5*-0.5);
  21. Z=(spl0*0.5)+(spl1*0.5  )+(spl4*-0.5)+(spl5*-0.5);
  22.  
  23. spl0=W;
  24. spl1=X;
  25. spl2=Z;
  26. spl4=0;
  27. spl5=0;
  28. )
  29. :(W=spl0; //decode
  30. X=spl1;
  31. Z=spl2*slider2;
  32.  
  33. spl0=   (W*0.5 )+( X*       0.5)+(Z*    0.5  ) ;
  34. spl1=   (W*0.5 )+( X*       -0.5)+(Z*   0.5  ) ;
  35. spl4=   (W*0.5 )+( X*       0.5 )+(Z*   -0.5  ) ;
  36. spl5=   (W*0.5 )+( X*       -0.5    )+(Z*   -0.5  ) ;
  37.  
  38. spl2=0;
  39. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement