«farfisa organ like sound» by nicolaariutti

on 10 Jun'18 12:38 in organviolinsyntheticflute

Trying to procedurally synthetise a violin, I eventually came out with a "Farfisa" organ like sound. It can be used also as a flute!

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
// define the violin-like sound synth
(
SynthDef(\violin, {
	| midinote=60, gate=1, amp=0.25 |
	var env = EnvGen.kr(Env.asr(0.1, 1, 0.1), gate, doneAction:2);
	var sig = VarSaw.ar(
		midinote.midicps,
		width:LFNoise2.kr(1).range(0.2, 0.8)*SinOsc.kr(5, Rand(0.0, 1.0)).range(0.7,0.8))*0.25;
	sig = sig * env * amp;
	Out.ar(0, sig!2);
}).add;
)


// play a chord (farfisa-like sound)
(
[60, 64, 67].do ({
	| note |
	Synth(\violin, [\midinote, note]);
})
)

// play a single note (it seems also a flute!)
x = Synth(\violin, [\midinote, 84]);
x.set(\gate, 0); // stop the note


// play some random notes
(
p = Pbind(
	\instrument, \violin,
	\midinote, Prand( Scale.majorPentatonic.degrees, inf) + 60,
	\dur, 3,
	\legato, 1
).play;
)
raw 765 chars (focus & ctrl+a+c to copy)
reception
comments