MM – Several synth experiments.

This one explores multichannel expansion to create multiple oscillators.

Also explores the creation of a Violin ensemble in which each oscillator has a Body IR and the overall ensemble is processed by a Hall IR.

Finally you’ll find all the list of Scales and Tunings to play with as well as Methods to manipulate patterns.

Huge thanks to Angelo Farina for sharing his IRs.

You can find the Violin Body IR here(among many other IRs):

http://pcfarina.eng.unipr.it/Public/IMP-RESP/

//Several synth experiments. 2020 Matias Monteagudo.

(
Server.local.options.device = "ASIO : ASIO PreSonus FireStudio";
Server.local.options.sampleRate=48000;
Server.local.options.hardwareBufferSize=128;
)

//Add reverb first.

((
	SynthDef(\verb, {
		|in, predelay=1, revtime=5, lpf=4500,mix=0.2,amp=1,out=0|
		var dry,wet,temp,sig;
		dry = In.ar(in, 2);
		temp = In.ar(in, 2);
		wet=0;
		temp=DelayN.ar(temp, 0.2, predelay);
		32.do {temp=AllpassN.ar(temp, 0.05, {Rand(0.001,0.05)}!2,revtime);
			temp=LPF.ar(temp,lpf);
			wet=wet+temp;
		};
		sig=XFade2.ar(dry,wet,mix*2-1,amp);
		Out.ar(out,sig);
	}).add;
);
)

//After evaluating this. You can hit "CMD+." or even restart the server and the verb will be there. (You'll need to re evaluate only if you restart SC)
(
~reverbBus = Bus.audio(s,2);
~createReverb={~reNnverbSynth=Synth(\verb, [\in, ~reverbBus])};
ServerTree.add(~createReverb);
)

ServerTree.removeAll;//If you wanna reset the Tree.

z = Synth(\Convr, [\outbus, 0, \wet, 0.15, \dry, 0.8], addAction:\addToTail)
NN
//Modulated drops
(
SynthDef(\drops, {
	|gate=1, amp=1, panpos=0, rel=1, atk, freq,exp|
	var sig;
	sig=WhiteNoise.ar(amp)*EnvGen.ar(Env.perc(0.01,rel,1,-40),gate,doneAction:2);
	sig={BPF.ar(sig, Rand(100,freq)+Line.ar(Rand(0,300),Rand(0,300),1),0.003)}!2;
	sig=Splay.ar(sig, 1, center:panpos);
		Out.ar(~reverbBus,sig)
}).add
)

d=Synth(\drops, [\amp, 20, \panpos, 0, \rel,2, \freq, 2000])
d.free

//Modulated metallic bells
(
SynthDef(\metal, {
	|gate=1, amp=1, panpos=0, rel=1, atk, freq, exp, modsp|
	var sig;
	sig=WhiteNoise.ar(amp)*EnvGen.ar(Env.perc(0.01,rel,1,-20),gate,doneAction:2);
	sig={BPF.ar(sig, Rand(100,freq)+Line.ar(Rand(0,100),Rand(0,100),modsp),0.0003)}!24;
	sig=Splay.ar(sig, 1, center:panpos);
		Out.ar(~reverbBus,sig)
}).add
)

m=Synth(\metal, [\amp, 40, \panpos, 0, \rel,20, \freq, 2500, \modsp,10])

//Playable drops
(
SynthDef(\pdrops, {
	|gate=1, amp=1, panpos=0, rel=1, atk, freq,exp|
	var sig;
	sig=WhiteNoise.ar(amp)*EnvGen.ar(Env.perc(0.01,rel,1,-40),gate,doneAction:2);
	sig={BPF.ar(sig, freq+Line.ar(Rand(0,10),Rand(0,10),1),0.003)}!2;
	sig=Splay.ar(sig, 1, center:panpos);
		Out.ar(~reverbBus,sig)
}).add
)

~pd=Synth(\pdrops, [\amp, 20, \panpos, 0, \rel,2, \freq, 2000])

//Violin ensemble with convolution body and hall. Expansion at the delay.

(
Server.local.options.device = "ASIO : ASIO PreSonus FireStudio";
Server.local.options.sampleRate=48000;
Server.local.options.hardwareBufferSize=128;
Server.local.options.memSize=524288;//Increase mem size.
)

//Body and Hall IRs
(
~irBody="G:/IRs/Angelo Farina/Violins/KLOTZ.WAV";
~irVerb="G:/IRs/Foley IRs - Real Spaces/Altiverb/Altiverb 6/Concert Halls Large/Konzerthaus Vienna Large Hall/Konzerthaus Vienna Large Hall - M_S - 10m.wav";
~ezBody=EZConv(~irBody,1024);
~ezVerb=EZConv(~irVerb,1024);
)

(
SynthDef(\vlinEns, {
	|gate=1, amp=0.5, panpos=0, atk=0.1, rel=1, freq|
	var sig,mod,vib;
	vib=SinOsc.ar(Rand(5,7),0,0.004,0.996);
	mod=freq*vib*LFNoise1.kr(2).range(-0.15, 0.15).midiratio;
	sig=Pulse.ar(mod,LFNoise1.kr(Rand(0.25,1)).range(0.83,0.95));
	sig={DelayN.ar(sig,Rand(0.01,0.1))}!24;
	sig=Mix.ar([sig*0.1,~ezBody.ar(sig,0,0.4)])*0.8;
	sig=BBandStop.ar(sig,2640,0.5);
	sig=BBandStop.ar(sig,2500,0.5);
	sig=sig*EnvGen.kr(Env.adsr(atk,0.3,amp,rel,0.4),gate,doneAction:2);
	sig=Splay.ar(sig, 0.2, center:panpos);
	sig=~ezVerb.ar([sig[0],sig[1]],0,0.010);
	Out.ar(~reverbBus,sig)
}).add
)

~pd=Synth(\vlinEns, [\amp, 0.4, \panpos, 0, \atk,0.2, \rel,1, \freq, 200])
~pd.set(\gate,0)

{LFNoise1.kr(1).range(0.8,0.9)}.plot(5);
{Rand(0.8,0.9)}.plot(5)

//Patterns

//Pdrops
(
Pdefn(\deg, Pseq([1,2,3,4,5,6,7,8,9,10],inf));
Pdefn(\rel, Pwhite(1,3));
Pdefn(\sc, Scale.majorPentatonic);
Pdefn(\tn, Tuning.pythagorean);
p=Pbind(\instrument, \pdrops, \amp, 20, \dur, 1/4,
	\tuning, Pdefn(\tn),
	\scale, Pdefn(\sc),
	\degree, Pdefn(\deg),
	\rel, Pdefn(\rel),
	\panpos, Pwhite(-0.6,0.6),
).play
)

p.stop

//Violin  Ens
(
Pdefn(\deg, Pseq ([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15].stutter(2).slide(4, 1),inf));
// Pdefn(\sc, Scale.indian(\just));
Pdefn(\sc, Scale.majorPentatonic(\et12));
p=Pbind(\instrument, \vlinEns, \amp, 0.05, \dur, 1/4, \legato,1/8, \atk,0.2, \rel,0.5, \portamento, 0.3,
	\octave,5,
	\tuning, Pdefn(\tn),
	\scale, Pdefn(\sc),
	\degree, Pdefn(\deg),
	\panpos,0,
).play
)

p.stop



Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].mirror1.stutter(2),inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].sputter(0.2, 16),inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].slide(4, 1),inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].powerset,inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].scramble,inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].pyramid,inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].pyramid(2),inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].pyramid(3),inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].pyramid(4),inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].pyramidg,inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].pyramidg(2),inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].pyramidg(3),inf));
Pdefn(\deg, Pseq([0,1,2,3,4,5,6,7,8,9,10].pyramidg(4),inf));
Pdefn(\rel, Pwhite(1,3));

// Scales
Scale.directory

Pdefn(\sc, Scale.majorPentatonic);
Pdefn(\sc, Scale.minorPentatonic);
Pdefn(\sc, Scale.ritusen);
Pdefn(\sc, Scale.egyptian);
Pdefn(\sc, Scale.kumoi);
Pdefn(\sc, Scale.hirajoshi);
Pdefn(\sc, Scale.iwato);
Pdefn(\sc, Scale.chinese);
Pdefn(\sc, Scale.indian(\just));
Pdefn(\sc, Scale.pelog);
Pdefn(\sc, Scale.prometheus);
Pdefn(\sc, Scale.scriabin);
Pdefn(\sc, Scale.gong);
Pdefn(\sc, Scale.shang);
Pdefn(\sc, Scale.jiao);
Pdefn(\sc, Scale.zhi);
Pdefn(\sc, Scale.yu);
Pdefn(\sc, Scale.whole);
Pdefn(\sc, Scale.augmented);
Pdefn(\sc, Scale.augmented2);
Pdefn(\sc, Scale.partch_o1);
Pdefn(\sc, Scale.partch_o2);
Pdefn(\sc, Scale.partch_o3);
Pdefn(\sc, Scale.partch_o4);
Pdefn(\sc, Scale.partch_o5);
Pdefn(\sc, Scale.partch_o6);
Pdefn(\sc, Scale.partch_u1);
Pdefn(\sc, Scale.partch_u2);
Pdefn(\sc, Scale.partch_u3);
Pdefn(\sc, Scale.partch_u4);
Pdefn(\sc, Scale.partch_u5);
Pdefn(\sc, Scale.partch_u6);
Pdefn(\sc, Scale.hexMajor7);
Pdefn(\sc, Scale.hexDorian);
Pdefn(\sc, Scale.hexPhrygian);
Pdefn(\sc, Scale.hexSus);
Pdefn(\sc, Scale.hexMajor6);
Pdefn(\sc, Scale.hexAeolian);
Pdefn(\sc, Scale.major);
Pdefn(\sc, Scale.ionian);
Pdefn(\sc, Scale.dorian);
Pdefn(\sc, Scale.phrygian);
Pdefn(\sc, Scale.lydian);
Pdefn(\sc, Scale.mixolydian);
Pdefn(\sc, Scale.aeolian);
Pdefn(\sc, Scale.minor);
Pdefn(\sc, Scale.locrian);
Pdefn(\sc, Scale.harmonicMinor);
Pdefn(\sc, Scale.harmonicMajor);
Pdefn(\sc, Scale.melodicMinor);
Pdefn(\sc, Scale.melodicMinorDesc);
Pdefn(\sc, Scale.melodicMajor);
Pdefn(\sc, Scale.bartok);
Pdefn(\sc, Scale.hindu);
Pdefn(\sc, Scale.todi);
Pdefn(\sc, Scale.purvi);
Pdefn(\sc, Scale.marva);
Pdefn(\sc, Scale.bhairav);
Pdefn(\sc, Scale.ahirbhairav);
Pdefn(\sc, Scale.superLocrian);
Pdefn(\sc, Scale.romanianMinor);
Pdefn(\sc, Scale.hungarianMinor);
Pdefn(\sc, Scale.neapolitanMinor);
Pdefn(\sc, Scale.enigmatic);
Pdefn(\sc, Scale.spanish);
Pdefn(\sc, Scale.leadingWhole);
Pdefn(\sc, Scale.lydianMinor);
Pdefn(\sc, Scale.neapolitanMajor);
Pdefn(\sc, Scale.locrianMajor);
Pdefn(\sc, Scale.diminished);
Pdefn(\sc, Scale.diminished2);
Pdefn(\sc, Scale.chromatic);
Pdefn(\sc, Scale.chromatic24);

// Tunings
Tuning.directory

Pdefn(\sc, Scale.major(\pythagorean));
Pdefn(\sc, Scale.major(\et12)); //Default.
Pdefn(\sc, Scale.major(\just)); //Good for Indian music.
Pdefn(\sc, Scale.major(\sept1));
Pdefn(\sc, Scale.major(\sept2));
Pdefn(\sc, Scale.major(\mean4));
Pdefn(\sc, Scale.major(\mean5));
Pdefn(\sc, Scale.major(\mean6));
Pdefn(\sc, Scale.major(\kirnberger));
Pdefn(\sc, Scale.major(\werckmeister));
Pdefn(\sc, Scale.major(\vallotti));
Pdefn(\sc, Scale.major(\young));
Pdefn(\sc, Scale.major(\reinhard));
Pdefn(\sc, Scale.major(\wcSJ));
Pdefn(\sc, Scale.major(\lu));
Pdefn(\sc, Scale.major(\et19));
Pdefn(\sc, Scale.major(\et22));
Pdefn(\sc, Scale.major(\et24));
Pdefn(\sc, Scale.major(\johnston));
Pdefn(\sc, Scale.major(\partch));
Pdefn(\sc, Scale.major(\catler));
Pdefn(\sc, Scale.major(\chalmers));
Pdefn(\sc, Scale.major(\harrison));
Pdefn(\sc, Scale.major(\sruti));
Pdefn(\sc, Scale.major(\perret));
Pdefn(\sc, Scale.major(\michael_harrison));
Pdefn(\sc, Scale.major(\harmonic));
Pdefn(\sc, Scale.major(\bp));
Pdefn(\sc, Scale.major(\wcHarm)); //Wendy Carlos tunings.
Pdefn(\sc, Scale.major(\wcAlpha));
Pdefn(\sc, Scale.major(\wcBeta));
Pdefn(\sc, Scale.major(\wcGamma));
Author
418 PM
  • Platform:
  • Category: Other
  • Revision: 1.0
  • License: GNU General Public License family
  • Views: 112
  • Modified: 5 months ago
Chat about this patch on Discord!
Appreciate

Leave a Reply