rdk

Check-in [a6b78cca83]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:compiled /initrd/mnt/dev_save/dsp/rdk/SchlemmerReverb/zita_ref1c.dsp to zita_ref1c.jgtk using f2jgtk. sim_orig
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | www
Files: files | file ages | folders
SHA1:a6b78cca8397e9819be341e69174d678d98ae23d
User & Date: root 2019-01-03 03:54:55
Context
2019-01-03
05:02
SchlemmerReverb/zita_ref1c.jgtk --> preset: glocke (suzanne_orig.wav) (/initrd/mnt/dev_save/dsp/rdk/SchlemmerReverb/zita_ref1c-presets) funny check-in: 38faa7c0f3 user: root tags: www
03:54
compiled /initrd/mnt/dev_save/dsp/rdk/SchlemmerReverb/zita_ref1c.dsp to zita_ref1c.jgtk using f2jgtk. sim_orig check-in: a6b78cca83 user: root tags: www
2018-12-23
12:09
compiled /initrd/mnt/dev_save/dsp/rdk/SchlemmerReverb/zita_ref1c.dsp to zita_ref1c.dll using f2w32vst. check-in: e036429c90 user: root tags: www
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SchlemmerReverb/zita_ref1.gui.

1
2
3
4
5
6
7
8



9
10
11
12
13
14
15
guigroup1(fx)=vgroup("[1]Zita_Extended",tgroup("",vgroup("2 Room Model",fx)));
guigroup2(fx)=vgroup("[1]Zita_Extended",tgroup("",vgroup("1 Reverb",fx)));
guigroup3(fx)=vgroup("[1]Zita_Extended",tgroup("",hgroup("3 Outmix",fx)));

  SIM_GUI_ROOM(i)       =guigroup1(hgroup("1",hslider("SIM_ROOM(%i)[unit:m]",SIM_ROOM(i),0,100,0.01)));
  SIM_GUI_SOURCE(i)     =guigroup1(hgroup("2",hslider("SIM_SOURCE(%i)[unit:percent]",SIM_SOURCE(i),0,1,.001))); 
  SIM_GUI_DESTINATION(i)=guigroup1(hgroup("3",hslider("SIM_DESTINATION(%i)[unit:percent]",SIM_DESTINATION(i),0,1,.001))); 
  SIM_GUI_RS            =guigroup2(hslider("[0]RoomSize",RoomSize,0.010,4,.001));




  ZE_GUI_APG(i)         =guigroup2(hslider("[15]AP_G",AP_G,0,.9,.01)); 
  ZE_GUI_FLTON          =guigroup2(checkbox("compare_loss_filters"));
  ZE_GUI_MAINFB         =guigroup2(hslider("[12]RT",RT,0,.999,.001));
  ZE_GUI_ERCOMPRESSION  =guigroup2(hslider("[17]ER_COMPRESSION_FACTOR",ER_COMPRESSION_FACTOR,0,1,.01));
  ZE_GUI_APPERCENT      =guigroup2(hslider("[13]APDELAY_PERCENT",APDELAY_PERCENT,0,1,.01));
  




|
|
|

>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
guigroup1(fx)=vgroup("[1]Zita_Extended",tgroup("",vgroup("2 Room Model",fx)));
guigroup2(fx)=vgroup("[1]Zita_Extended",tgroup("",vgroup("1 Reverb",fx)));
guigroup3(fx)=vgroup("[1]Zita_Extended",tgroup("",hgroup("3 Outmix",fx)));

  SIM_GUI_ROOM(i)       =guigroup1(hgroup("1",nentry("SIM_ROOM(%i)[unit:m]",SIM_ROOM(i),0,100,0.001)));
  SIM_GUI_SOURCE(i)     =guigroup1(hgroup("2",nentry("SIM_SOURCE(%i)[unit:percent]",SIM_SOURCE(i),0,100,.001))); 
  SIM_GUI_DESTINATION(i)=guigroup1(hgroup("3",nentry("SIM_DESTINATION(%i)[unit:percent]",SIM_DESTINATION(i),0,100,.001))); 
  SIM_GUI_RS            =guigroup2(hslider("[0]RoomSize",RoomSize,0.010,4,.001));
  //1c:
   SIM_GUI_LR           =guigroup1(hgroup("3",hslider("SIM_LR[unit:percent]",SIM_LR,0,1,.001))); 
   SIM_GUI_DISTANCE     =guigroup1(hgroup("3",hslider("SIM_DISTANCE[unit:percent]",SIM_DISTANCE,0,1,.001))); 

  ZE_GUI_APG(i)         =guigroup2(hslider("[15]AP_G",AP_G,0,.9,.01)); 
  ZE_GUI_FLTON          =guigroup2(checkbox("compare_loss_filters"));
  ZE_GUI_MAINFB         =guigroup2(hslider("[12]RT",RT,0,.999,.001));
  ZE_GUI_ERCOMPRESSION  =guigroup2(hslider("[17]ER_COMPRESSION_FACTOR",ER_COMPRESSION_FACTOR,0,1,.01));
  ZE_GUI_APPERCENT      =guigroup2(hslider("[13]APDELAY_PERCENT",APDELAY_PERCENT,0,1,.01));
  

Changes to SchlemmerReverb/zita_ref1.lib.






























































1
2
3
4

5
6
7
8
9
10
11





























































sim = environment {

//-----------------------------------------------
//      ER: source image model (shoebox)

//-----------------------------------------------

/*** room model *****************

Coordinates:
(R)oom        <Rx,Ry,Rz> 
(S)ource      <Sx,Sy,Sz>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



<
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

65
66
67
68
69
70
71
72
sim_orig = environment {

/*** room model *****************

room <L,B,H> ,(s)ender, (r)eceiver

        front

width  <  B   >
      ^ +------+  ^(Length L)
    42 ¦ (s)  ¦  |
       ¦______¦  | ^
 (left)¦      ¦  | |
       ¦  (r) ¦  | (Distance)
       ¦      ¦  | |
     0 +------+  x x
       0     19                
        rear

*********************************/ 

//gui implementation (zitagui.lib): 
//GUI_ROOM(i)=groupx(hslider("ROOM(%i)",ROOM(i),min,max,step));
L = SIM_GUI_ROOM(1) *(SIM_GUI_RS); //default: SIM_ROOM(1)=42; 
B = SIM_GUI_ROOM(2) *(SIM_GUI_RS); //default: SIM_ROOM(2)=19;
H = SIM_GUI_ROOM(3) *(SIM_GUI_RS); //default: SIM_ROOM(3)=16;

Ls = SIM_GUI_SOURCE(1) *(SIM_GUI_RS); //default: SIM_SOURCE(1)=33;
Bs = SIM_GUI_SOURCE(2) *(SIM_GUI_RS); //default: SIM_SOURCE(2)=11; 
Hs = SIM_GUI_SOURCE(3);             //default: SIM_SOURCE(3)=3; //sender (stage hight does not change with room size)

Lr = (Ls-1)*SIM_GUI_DISTANCE; //default: SIM_DISTANCE=0.91; 
Br = (B)*(SIM_GUI_LR);        //default: SIM_LR=0.50;
Hr = SIM_GUI_DESTINATION(3) ; //default: SIM_DESTINATION(3)=1; //receiver (chair hight does not change with room size)

SPEED_OF_SOUND=343;

//define a pattern of 8 source image models
ssq(0) = Ls 	, -Bs 		, Hs ; //left 
ssq(1) = Ls 	, 2*B-Bs 	, Hs ; //right
ssq(2) = Ls 	, -Bs 		, 2*H-Hs ; //left + ceiling
ssq(3) = Ls 	, 2*B-Bs 	, 2*H-Hs ; //right + ceiling
ssq(4) = 2*L-Ls , -Bs 		, Hs ; //left + front
ssq(5) = 2*L-Ls , 2*B-Bs 	, Hs ; //right + front
ssq(6) = -Ls , -Bs 		, 2*H-Hs ; //left + ceiling + rear
ssq(7) = -Ls , 2*B-Bs , 2*H-Hs ; //right + ceiling + rear

vector(i) = ssq(i), (-Lr,-Br,-Hr) :> bus(3) ; 

betrag(i) = vector(i) : par(i,3,quadrat) :> sqrt ;
 quadrat(x) = x*x ;


reflectiondelay_ms(i) = ((betrag(i) - direct_m) / SPEED_OF_SOUND) *1000 ;
reflectionlevel(i) = direct_m/(betrag(i)) *(ERCOMPRESSION) + makeup ;
 makeup = 1 - ERCOMPRESSION ;

direct_m = (Ls-Lr), (Bs-Br), (Hs-Hr) : par(i,3,quadrat) :> sqrt ;

};

sim = environment {

//-----------------------------------------------

//      Source Image Model
//-----------------------------------------------

/*** room model *****************

Coordinates:
(R)oom        <Rx,Ry,Rz> 
(S)ource      <Sx,Sy,Sz>

Added SchlemmerReverb/zita_ref1c.defaults.





















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//defaults:

RT=0.222;
RoomSize=1.32;
APDELAY_PERCENT=0.62;
ER_COMPRESSION_FACTOR=1;
AP_G=0.62;

DIR_WD=1;
Outdelay=256;//samples
Outlevel(1)=0.3;
Outlevel(2)=-0.5;

SIM_ROOM(1)=42.00;
SIM_ROOM(2)=19.00;
SIM_ROOM(3)=16.00;
SIM_SOURCE(1)=33;
SIM_SOURCE(2)=11;
SIM_SOURCE(3)=3;
SIM_DISTANCE=0.91;
SIM_LR=0.50;
SIM_DESTINATION(i)=1; 
SIM_MOVEMENT=0.02;

ZE_SinusFreqHz=1.18;
ZE_SinusDepth=0.004;

Changes to SchlemmerReverb/zita_ref1c.dsp.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
55
56
57
58
59
60
61
62
63



64
65
66
67
68
69
70
import("maxmsp.lib");
import("effect.lib");//modified

import("classic6.lib");//cl.
import("zita_ref1.lib");
import("zita_ref1.gui");
import("zita_ref1.defaults");

///Extending Zita Reverb with Virtual Room Acoustics 
//Life coding/sound processing and modification of the famous zita reverb by fons adriaensen.

//---------------------------------------------------------------------------------------
re=library("effect.lib"); // doesn't work because with {} is used for 'member' functions.
//---------------------------------------------------------------------------------------
................................................................................
fbdelaylines(zt.N)=par(i,zt.N,(fdelay(zt.maxfbdelay(i),(ze.fbdelay(i)))));
///step 2.1: change *g to UI
allpass_combs(N)=par(i,zt.N,(allpass_fcomb(zt.maxapdelay(i),ze.apdelay(i),ZE_GUI_APG(i)))) with {
  
  allpass_fcomb(maxdel,N,aN) = (+ <: fdelay(maxdel,N-1),*(aN)) ~ *(-aN) : mem,_ : + ;//filters.lib
  }; 
///step 3: change delay(i) lenths to reflect SIM
apdelay(i)=sim.ssq(i+1)*ZE_GUI_APPERCENT*SR/1000.0; //samples //rename ssq reflection
fbdelay(i)=sim.ssq(i+1)*SR/1000.0;




///step 4: change delay(i) lenths to reflect SIM
reflevel(N) = par(i,N,*(reflectionlevel(i)));
reflectionlevel(i) = sim.D0/(sim.ref(i+1)) *(ZE_GUI_ERCOMPRESSION) + makeup ;
 makeup = 1 - ZE_GUI_ERCOMPRESSION ;

///step 5: apply the lexicon trick






|







 







|
|
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import("maxmsp.lib");
import("effect.lib");//modified

import("classic6.lib");//cl.
import("zita_ref1.lib");
import("zita_ref1.gui");
import("zita_ref1c.defaults");

///Extending Zita Reverb with Virtual Room Acoustics 
//Life coding/sound processing and modification of the famous zita reverb by fons adriaensen.

//---------------------------------------------------------------------------------------
re=library("effect.lib"); // doesn't work because with {} is used for 'member' functions.
//---------------------------------------------------------------------------------------
................................................................................
fbdelaylines(zt.N)=par(i,zt.N,(fdelay(zt.maxfbdelay(i),(ze.fbdelay(i)))));
///step 2.1: change *g to UI
allpass_combs(N)=par(i,zt.N,(allpass_fcomb(zt.maxapdelay(i),ze.apdelay(i),ZE_GUI_APG(i)))) with {
  
  allpass_fcomb(maxdel,N,aN) = (+ <: fdelay(maxdel,N-1),*(aN)) ~ *(-aN) : mem,_ : + ;//filters.lib
  }; 
///step 3: change delay(i) lenths to reflect SIM
//apdelay(i)=sim.ssq(i+1)*ZE_GUI_APPERCENT*SR/1000.0; //samples //rename ssq reflection
//fbdelay(i)=sim.ssq(i+1)*SR/1000.0;

apdelay(i)=sim_orig.reflectiondelay_ms(i)*ZE_GUI_APPERCENT*SR/1000.0; //samples //rename ssq reflection
fbdelay(i)=sim_orig.reflectiondelay_ms(i)*SR/1000.0;

///step 4: change delay(i) lenths to reflect SIM
reflevel(N) = par(i,N,*(reflectionlevel(i)));
reflectionlevel(i) = sim.D0/(sim.ref(i+1)) *(ZE_GUI_ERCOMPRESSION) + makeup ;
 makeup = 1 - ZE_GUI_ERCOMPRESSION ;

///step 5: apply the lexicon trick

Added test/reduce.dsp.

























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import("all.lib");
import("maxmsp.lib"); 

	//calc <op> every <n> samps	
	rdc(n,op) = aloop ~ (_,_) : (!,_) with {
			aloop (count, val1) =
				if(count<(n), count+1, 1),     		
				if(count==n, op, val1);   		
			if (c, then, else) = select2(c, else, then);
		};
    
    
	inEQ = 	  (filtercoeff(110,	GUI0,	1.).lowShelf  ,_ 	: biquad )
		: (filtercoeff(187,	GUI1,	.25).peakingEQ ,_	: biquad )
		: (filtercoeff(1592,GUI2,	.25).peakingEQ ,_	: biquad )
		: (filtercoeff(7870,GUI3,	.25).peakingEQ ,_	: biquad )
		: (filtercoeff(14145,GUI4,	1.).highShelf ,_    : biquad )
		;
    
GUI0=nentry("Urban0",11,1,11,1);
GUI1=nentry("Urban1",11,1,11,1);
GUI2=nentry("Urban2",11,1,11,1);
GUI3=nentry("Urban3",11,1,11,1);
GUI4=nentry("Urban4",11,1,11,1);

op=inEQ;//filtercoeff(110,GUI,	1.).lowShelf  ,_ 	: biquad;

process=rdc(22050,op);