1
0
Fork 0

back to timeline. added envelopes to trigRingz

8-channel
Luka Prinčič 2020-03-27 14:57:12 +01:00
parent 978052425d
commit c364d9844d
2 changed files with 189 additions and 58 deletions

View File

@ -1,55 +1,67 @@
( (
SynthDef(\stndTrigRing, { SynthDef(\stndTrigRing, {
arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1; arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1, gate=1, fadeTime=1;
var snd, in; var snd, in, env;
in = StandardTrig.ar(min,max); in = StandardTrig.ar(min,max);
snd = Ringz.ar(in, freq, decay); snd = Ringz.ar(in, freq, decay);
snd = LPF.ar(snd, ffreq); snd = LPF.ar(snd, ffreq);
env = EnvGen.kr(
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
gate, doneAction: Done.freeSelf);
snd = snd * amp; snd = snd * env * amp;
Out.ar(out,snd) Out.ar(out,snd)
}).add; }).add;
); );
( (
SynthDef(\henoTrigRing, { SynthDef(\henoTrigRing, {
arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1; arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1, gate=1, fadeTime=1;
var snd, in; var snd, in, env;
in = HenonTrig.ar(min,max); in = HenonTrig.ar(min,max);
snd = Ringz.ar(in, freq, decay); snd = Ringz.ar(in, freq, decay);
snd = LPF.ar(snd, ffreq); snd = LPF.ar(snd, ffreq);
env = EnvGen.kr(
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
gate, doneAction: Done.freeSelf);
snd = snd * amp; snd = snd * env * amp;
Out.ar(out,snd) Out.ar(out,snd)
}).add; }).add;
); );
( (
SynthDef(\gbmanTrigRing, { SynthDef(\gbmanTrigRing, {
arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1; arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1, gate=1, fadeTime=1;
var snd, in; var snd, in, env;
in = GbmanTrig.ar(min,max); in = GbmanTrig.ar(min,max);
snd = Ringz.ar(in, freq, decay); snd = Ringz.ar(in, freq, decay);
snd = LPF.ar(snd, ffreq); snd = LPF.ar(snd, ffreq);
env = EnvGen.kr(
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
gate, doneAction: Done.freeSelf);
snd = snd * amp; snd = snd * env * amp;
Out.ar(out,snd) Out.ar(out,snd)
}).add; }).add;
); );
( (
SynthDef(\latooTrigRing, { SynthDef(\latooTrigRing, {
arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1; arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1, gate=1, fadeTime=1;
var snd, in; var snd, in, env;
in = LatoocarfianTrig.ar(min,max); in = LatoocarfianTrig.ar(min,max);
snd = Ringz.ar(in, freq, decay); snd = Ringz.ar(in, freq, decay);
snd = LPF.ar(snd, ffreq); snd = LPF.ar(snd, ffreq);
env = EnvGen.kr(
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
gate, doneAction: Done.freeSelf);
snd = snd * amp; snd = snd * env * amp;
Out.ar(out,snd) Out.ar(out,snd)
}).add; }).add;
); );
@ -58,14 +70,17 @@ SynthDef(\latooTrigRing, {
( (
SynthDef(\lorenzTrigRing, { SynthDef(\lorenzTrigRing, {
arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1; arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1, gate=1, fadeTime=1;
var snd, in; var snd, in, env;
in = LorenzTrig.ar(min,max); in = LorenzTrig.ar(min,max);
snd = Ringz.ar(in, freq, decay); snd = Ringz.ar(in, freq, decay);
snd = LPF.ar(snd, ffreq); snd = LPF.ar(snd, ffreq);
env = EnvGen.kr(
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
gate, doneAction: Done.freeSelf);
snd = snd * amp; snd = snd * env * amp;
Out.ar(out,snd) Out.ar(out,snd)
}).add; }).add;
); );
@ -73,14 +88,17 @@ SynthDef(\lorenzTrigRing, {
( (
SynthDef(\fhnTrigRing, { SynthDef(\fhnTrigRing, {
arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1; arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1, gate=1, fadeTime=1;
var snd, in; var snd, in, env;
in = FhnTrig.ar(min,max); in = FhnTrig.ar(min,max);
snd = Ringz.ar(in, freq, decay); snd = Ringz.ar(in, freq, decay);
snd = LPF.ar(snd, ffreq); snd = LPF.ar(snd, ffreq);
env = EnvGen.kr(
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
gate, doneAction: Done.freeSelf);
snd = snd * amp; snd = snd * env * amp;
Out.ar(out,snd) Out.ar(out,snd)
}).add; }).add;
); );

View File

@ -42,6 +42,8 @@ Server.default.waitForBoot {
}); });
s.meter; s.plotTree;
// octoPan busses ////////////// // octoPan busses //////////////
( (
@ -60,34 +62,34 @@ Server.default.waitForBoot {
~panBus1r = Bus.control(s,1); ~panBus1r = Bus.control(s,1);
~panBus1y.value = 0.14; // set a fixed value to a bus ~panBus1y.value = 0.14; // set a fixed value to a bus
~panBus1x.value = 0; ~panBus1x.value = 0;
~panBus1r.value = 1; ~panBus1r.value = 2;
// octoBus2 + panners and control busses: // octoBus2 + panners and control busses:
~octoBus2 = Bus.audio(s,1); ~octoBus2 = Bus.audio(s,1);
~panBus2x = Bus.control(s,1); ~panBus2x = Bus.control(s,1);
~panBus2y = Bus.control(s,1); ~panBus2y = Bus.control(s,1);
~panBus2r = Bus.control(s,1); ~panBus2r = Bus.control(s,1);
~panBus2y.value = 0; // set a fixed value to a bus ~panBus2y.value = 0.14; // set a fixed value to a bus
~panBus2x.value = 0; ~panBus2x.value = 0;
~panBus2r.value = 0.1; ~panBus2r.value = 2;
// octoBus3 + panners and control busses: // octoBus3 + panners and control busses:
~octoBus3 = Bus.audio(s,1); ~octoBus3 = Bus.audio(s,1);
~panBus3x = Bus.control(s,1); ~panBus3x = Bus.control(s,1);
~panBus3y = Bus.control(s,1); ~panBus3y = Bus.control(s,1);
~panBus3r = Bus.control(s,1); ~panBus3r = Bus.control(s,1);
~panBus3y.value = 0.29; // set a fixed value to a bus ~panBus3y.value = 0.14; // set a fixed value to a bus
~panBus3x.value = 0; ~panBus3x.value = 0;
~panBus3r.value = 0.1; ~panBus3r.value = 2;
// octoBus4 + panners and control busses: // octoBus4 + panners and control busses:
~octoBus4 = Bus.audio(s,1); ~octoBus4 = Bus.audio(s,1);
~panBus4x = Bus.control(s,1); ~panBus4x = Bus.control(s,1);
~panBus4y = Bus.control(s,1); ~panBus4y = Bus.control(s,1);
~panBus4r = Bus.control(s,1); ~panBus4r = Bus.control(s,1);
~panBus4y.value = 0.29; // set a fixed value to a bus ~panBus4y.value = 0.14; // set a fixed value to a bus
~panBus4x.value = 0; ~panBus4x.value = 0;
~panBus4r.value = 0.1; ~panBus4r.value = 2;
// 8chan reverb bus // 8chan reverb bus
~revBus = Bus.audio(s,8); ~revBus = Bus.audio(s,8);
@ -123,10 +125,147 @@ var timeLine, r;
~octoPanner4.map(\y, ~panBus4y); ~octoPanner4.map(\y, ~panBus4y);
~octoPanner4.map(\radius, ~panBus4r); ~octoPanner4.map(\radius, ~panBus4r);
// 4 x stereo reverbs are fixed to outputs ([0,1][2,3][4,5][6,7]) not panners!
~reverb = Synth("reverBusser", [\inBus, ~revBus, \outBus, 0], addAction: \addToTail); ~reverb = Synth("reverBusser", [\inBus, ~revBus, \outBus, 0], addAction: \addToTail);
// some default oscilations of pan and reverb
// 'set' values - disconnects mapping!
//~octoPanner1.set(\x, 0, \y, 0.28, \radius, 0.001);
~panner1y.free;
~panner2y.free;
~panner3y.free;
~panner4y.free;
//~panner1y = SynthDef(\pannerOsc, {Out.kr(~panBus1y, SinOsc.kr(0.1).range(0.1,0.2))}).play;
~panner1y = SynthDef(\randomPanY1, { Out.kr(~panBus1y, LFNoise2.kr(1).range(0,0.28))}).play;
~panner2y = SynthDef(\randomPanY2, { Out.kr(~panBus2y, LFNoise2.kr(1).range(0,0.28))}).play;
~panner3y = SynthDef(\randomPanY3, { Out.kr(~panBus3y, LFNoise2.kr(1).range(0,0.28))}).play;
~panner4y = SynthDef(\randomPanY4, { Out.kr(~panBus4y, LFNoise2.kr(1).range(0,0.28))}).play;
// convert to SynthDef + Synth for common oscilations?
~reverb1wetBus.free; ~wetOsc.free; // clean up
~reverb1wetBus = Bus.control(s, 1); // create control bus
~reverb.map(\verb1wet, ~reverb1wetBus); // map an argument to control bus
~wetOsc = SynthDef(\randomVerb1, {Out.kr(~reverb1wetBus, LFNoise2.kr(1).range(0, 0.8)) }).play;
// ~wetOsc.free;
// ~reverb.set(\verb1wet, 0);
// ~reverb.set(\verb1wet, 1);
// ~reverb.set(\verb2wet, 1);
timeLine = Routine { timeLine = Routine {
"--- starting main routine ...".postln; "--- starting main routine ...".postln;
/// SOIL //////////////////////////////////
// forestSoil granulation
"--- starting forestSoil granulation ...".postln;
~soil1 = Synth(\granSoil, [\out, ~octoBus1, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20]);
~soil1durBus = Bus.control(s,1);
~soil1durBus.value = 0.0001;
~soil1.map(\dur, ~soil1durBus);
wait(80);
~soil2 = Synth(\granSoil, [\out, ~octoBus2, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20]);
~soil2durBus = Bus.control(s,1);
~soil2durBus.value = 0.0001;
~soil2.map(\dur, ~soil2durBus);
wait(20);
~soil1DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil1durBus, SinOsc.kr(0.01,1.5pi).range(0.0001, 0.1))} ).play;
wait(20);
~soil2DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil2durBus, SinOsc.kr(0.01,1.5pi).range(0.0001, 0.2))} ).play;
wait(120);
~soil1.set(\dur, 0.0001);
wait(1);
~soil2.set(\dur, 0.0001);
// this could repeat somewhat?
~soil1.set(\gate, 0, \fadeTime, 15); // use envelope to fade out
wait(3);
~soil2.set(\gate, 0, \fadeTime, 15); // use envelope to fade out
wait(2);
/* NOTES:
~soil1DurOsc = SynthDef(\soilDurOsc, {Out.kr(30, SinOsc.kr(0.01,1.5pi).range(0.0001, 1))}).play
~soil1DurOsc.free
// start oscilation, very slowly
~soil1.set(\dur, 0.0001);
~soil1 = Synth(\granSoil, [\out, ~octoBus1, \sndbuf, ~forestSoilBuf]);
~soil1.set(\rate, 0.2);
~soil1.set(\out, 1);
~soil1.set(\dur, 0.01);
~soil1.set(\amp, 1);
~soil1.set(\out, 1);
~soil1.set(\envbuf, ~planotaBuf);
// send SinOscilation to a argument via bus
~foreskrBus = Bus.control(s, 1);
~soil1.map(\dur, ~foreskrBus);
~durOsc = {Out.kr(~foreskrBus, SinOsc.kr(0.1).range(0.007,0.1))}.play;
~durOsc.free;
// another granulator
~soil2 = Synth(\granSoil, [\out, ~octoBus2, \sndbuf, ~forestSoilBuf]);
~soil2.map(\dur, ~foreskrBus);
~soil2.set(\amp, 0.1)
~soil1.set(\gate, 0, \fadeTime, 2); // use envelope to fade out
~soil2.set(\gate, 0, \fadeTime, 2); // use envelope to fade out
// stop:free
~soil1.free // stop.
~soil2.free // stop.
*/
~lorenzTrig1 = Synth(\lorenzTrigRing, [\out, ~octoBus1, \freq, 1400, \amp, 0.5, \fadeTime, 5]);
~lorenzTrig1.set(\fadeTime, 5, \gate, 0);
//~lorenzTrig1.free;
//1.wait; //1.wait;
@ -323,14 +462,17 @@ FreqScope.new(400, 200, 0, server: s);
// testing stuff! /////////////////////////////////////////////////////////////////////////////////////// // testing stuff! ///////////////////////////////////////////////////////////////////////////////////////
~lorenzTrig1 = Synth(\lorenzTrigRing, [\out, ~octoBus1, \freq, 1400, \amp, 0.5]); ~lorenzTrig1 = Synth(\lorenzTrigRing, [\out, ~octoBus1, \freq, 1400, \amp, 0.5]);
~reverb.set(\verb1wet, 0.3); ~lorenzTrig1.set(\amp,0.2)
~reverb.set(\verb1wet, 1);
~reverb.set(\verb1wet, 0);
~reverb.set(\verb2wet, 1); ~reverb.set(\verb2wet, 1);
// 'set' values - disconnects mapping! // 'set' values - disconnects mapping!
~octoPanner1.set(\x, 0, \y, 0.28, \radius, 0.001); ~octoPanner1.set(\x, 0, \y, 0.28, \radius, 0.001);
~panner1y.free; ~panner1y.free;
~panner1y = {Out.kr(~panBus1y, SinOsc.kr(0.1).range(0,0.28))}.play; ~panner1y = SynthDef(\pannerOsc, {Out.kr(~panBus1y, SinOsc.kr(0.1).range(0.1,0.2))}).play;
~panner1y = SynthDef(\randomPanY, { Out.kr(~panBus1y, LFNoise0.kr(9).range(0,0.28))}).play; ~panner1y = SynthDef(\randomPanY, { Out.kr(~panBus1y, LFNoise0.kr(9).range(0,0.28))}).play;
// convert to SynthDef + Synth for common oscilations? // convert to SynthDef + Synth for common oscilations?
@ -374,6 +516,7 @@ FreqScope.new(400, 200, 0, server: s);
~latooWan1 = Synth(\latooWanderings, [\out, ~octoBus4, \fadeTime, 0.1]); ~latooWan1 = Synth(\latooWanderings, [\out, ~octoBus4, \fadeTime, 0.1]);
~latooWan1.set(\out,1) ~latooWan1.set(\out,1)
~latooWan1.set(\out,~octoBus1)
~latooWan1.set(\amp,1) ~latooWan1.set(\amp,1)
~latooWan1.set(\gate, 0, \fadeTime, 10); ~latooWan1.set(\gate, 0, \fadeTime, 10);
~latooWan1.free; ~latooWan1.free;
@ -430,36 +573,6 @@ FreqScope.new(400, 200, 0, server: s);
// forestSoil granulation
~soil1 = Synth(\granSoil, [\out, ~octoBus1, \sndbuf, ~forestSoilBuf]);
~soil1.set(\rate, 0.2);
~soil1.set(\out, 1);
~soil1.set(\dur, 0.01);
~soil1.set(\amp, 0.1);
~soil1.set(\out, 1);
~soil1.set(\envbuf, ~planotaBuf);
// send SinOscilation to a argument via bus
~foreskrBus = Bus.control(s, 1);
~soil1.map(\dur, ~foreskrBus);
~durOsc = {Out.kr(~foreskrBus, SinOsc.kr(0.1).range(0.007,0.1))}.play;
~durOsc.free;
// another granulator
~soil2 = Synth(\granSoil, [\out, ~octoBus2, \sndbuf, ~forestSoilBuf]);
~soil2.map(\dur, ~foreskrBus);
~soil2.set(\amp, 0.1)
~soil1.set(\gate, 0, \fadeTime, 2); // use envelope to fade out
~soil2.set(\gate, 0, \fadeTime, 2); // use envelope to fade out
// stop:free
~soil1.free // stop.
~soil2.free // stop.