«sound | harmonics» by yotamorimoto

on 24 Jul'18 11:17 in additive synthesisharmonics

web experiments http://yota.tehis.net/webX

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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// sound | harmonics

// web experiments
// http://yota.tehis.net/webX/harmonics
(
s.waitForBoot {
	~n = 20;
	~b = 256;
	~f = s.sampleRate/~b;
	FreqScope.new;
	s.scope(1, 0, bufsize: ~b*2);
};
)
// ------------------ demos ------------------ //
// #0
// randomness
(
{
	Mix.arFill(~n, { |i|
		i=i+1;
		FSinOsc.ar(~f*i, 0, 1/i) * LFNoise2.kr(1).exprange(0.05, 1)
	}).dup * 0.8;
}.play;
)
// #1
(
{
	Mix.arFill(~n, { |i|
		i=i+1;
		FSinOsc.ar(~f*i, 0, 1/i) * LFTri.kr(i*0.05+0.05, i/~n*4).exprange(0.05, 1)
	}).dup * 0.6;
}.play;
)
// #2
// randomness faster
(
{
	Mix.arFill(~n, { |i|
		i=i+1;
		FSinOsc.ar(~f*i, 0, 1/i) * LFNoise2.kr(7).exprange(0.05, 1)
	}).dup * 0.8;
}.play;
)
// #3
// timbre melody
(
{
	Mix.arFill(~n, { |i|
		i=i+1;
		FSinOsc.ar(~f*i, 0, 1/i) * LFNoise0.kr(5).exprange(0.01, 1).lag
	}).dup * 0.8;
}.play;
)
// #4
// waveshape
(
{
	VarSaw.ar(~f, 0, LFTri.kr(0.05).range(0, 1)).dup * 0.5;
}.play;
)
// #5
// pwm
(
{
	OnePole.ar(
		LFPulse.ar(~f, 0, LFTri.kr(XLine.kr(0.1, 2, 10), 0).range(0.01, 0.99), 2, -1)*0.4,
		0.85
	).dup
}.play;
)
// #6
// wavefold
{ FSinOsc.ar(~f, 0, SinOsc.kr(0.07, 1.5pi).range(0.7, 4.3)).fold2.dup * 0.8 }.play;

(
// #7
// harmonic dust swipe
{
	{
		Mix.arFill(50, { |i|
			i=i+1;
			FSinOsc.ar(~f*i, 0, 1/i)
			* LFTri.kr(0.1, i/~n*2).exprange(0.05, 3)
			* Env.perc.kr(0, Dust.kr(1+(i/~n)));
		}) * 0.6;
	}.dup.tanh;
}.play;
)
raw 1463 chars (focus & ctrl+a+c to copy)
reception
comments