-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIM-tones
More file actions
60 lines (51 loc) · 923 Bytes
/
IM-tones
File metadata and controls
60 lines (51 loc) · 923 Bytes
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
desc:Inter-modulation test tones 18+19 and 21+22kHz
import cookdsp.jsfx-inc
slider1:-24<-96,0,1>Level (dB)
slider2:1<0,1,1{off,on}>18+19kHz
slider3:1<0,1,1{off,on}>21+22kHz
slider4:0<0,1,1{stereo,multi}>Stereo or multichannel
@init
frm = 100;
sine1.sine(frm*210, 0);
sine2.sine(frm*220, 0);
sine3.sine(frm*180, 0);
sine4.sine(frm*190, 0);
slider4 == 1 ? (
myChannels = num_ch;
) : (
myChannels = 2;
);
@slider
gain=2^(slider1 /6);
slider4 == 1 ? (
myChannels = num_ch;
) : (
myChannels = 2;
);
@sample
slider3 == 1 ? (
output += (
sine1.sine_do()+
sine2.sine_do()
);
);
slider2 == 1 ? (
output += (
sine3.sine_do()+
sine4.sine_do()
);
);
output *= gain;//* 0.125);
b=0;
loop(myChannels,
spl(b)+=output;
b+=1;
);
/*
spl1 += ((
sine1.sine_do()+
sine2.sine_do()+
sine3.sine_do()+
sine4.sine_do()
) * 0.125);
*/