--- /dev/null
+// trying varios scales
+
+~tun = Tuning.new((0..12).collect(_ * (12*(3 ** (1/13)).log2)), 3, "tritave");
+~scale = Scale.chromatic(~tun);
+
+(
+SynthDef(\sibino, { |
+ out=0, gate=1, freq=440, modFreq=440, amp=1, release=1.0, maxIndex=1
+ |
+ var sig, modIndex, env;
+ env = EnvGen.ar(Env.asr(releaseTime: release), gate, doneAction: 2);
+ modIndex = (1 - env) * maxIndex;
+ sig = PMOsc.ar(freq, modFreq, modIndex, mul: amp);
+ sig = sig * env;
+ sig = Pan2.ar(sig, Rand(-0.3, 0.3));
+ Out.ar(out, sig * amp);
+}).add;
+)
+
+(
+SynthDef(\sidrub, {
+ | out=0, gate=1, freq=440, amp=1, cut=800, rez=0.8,
+ modFreqMin=7, modFreqMax=12, modAmp=0.01, sustain=1.0 |
+ var sig = 0;
+ var modFreq = SinOsc.kr(Rand(modFreqMin, modFreqMax), 0, modAmp, 1);
+ sig = sig + Pulse.ar(freq * modFreq);
+ sig = RLPF.ar(sig, cut.lag(0.01), rez.lag(0.01));
+ sig = sig * EnvGen.ar(Env.perc(releaseTime: sustain), gate, doneAction: 2);
+ sig = Pan2.ar(sig, Rand(-0.3, 0.3));
+ Out.ar(out, sig * amp);
+}).add;
+)
+
+(
+SynthDef(\siruse, { | gate = 1, freq = 55, amp=1, out=0 |
+ var sig = AnalogBassDrum.ar(
+ gate,
+ infsustain: 1,
+ accent: 0.9,
+ freq: freq,
+ tone: 0.7,
+ decay: 0.15,
+ attackfm: 0.31,
+ selffm: 0.15,
+ );
+ sig = sig * EnvGen.ar(Env.adsr(0.01, 0.2, 0.9, 0.25), gate, doneAction: 2);
+ sig = Pan2.ar(sig, 0);
+ Out.ar(out, sig * amp);
+}).add;
+)
+
+(
+Pdef(\nodi, Pbind(
+ \instrument, \sibino,
+ \scale, ~scale,
+ \octave, 5,
+ \modFreq, Pexprand(1, 1000, inf),
+ \maxIndex, Plprand(1, 20, inf),
+ \note, Pwrand([
+ Pseq([0, 3, 5, 3], 1),
+ Pseq([0, 3, 7, 2], 1),
+ Pseq([3, 7, 5, 2], 1),
+ ],
+ [1, 1, 1].normalizeSum, inf),
+ \db, -4,
+ \dur, 1,
+ \legato, 0.2,
+)).quant_(4).stop;
+)
+
+(
+Pdef(\nosa, Pbind(
+ \instrument, \sibino,
+ \scale, ~scale,
+ \octave, 6,
+ \modFreq, Pexprand(1, 1000, inf),
+ \maxIndex, Plprand(1, 20, inf),
+ \note, Pwrand([
+ Pseq([0, 3, 8, 2], 1),
+ Pseq([0, 3, 7, 2], 1),
+ Pseq([3, 10, 5, 2], 1),
+ ],
+ [1, 1, 1].normalizeSum, inf),
+ \db, -7,
+ \dur, 4 * Pwrand([
+ Pseq([1, 1, 1, 1].normalizeSum, 1),
+ Pseq([3, 3, 2, 3].normalizeSum, 1),
+ Pseq([2, 1, 2, 4].normalizeSum, 1),
+ ],
+ [1, 1, 1].normalizeSum, inf),
+ \legato, 0.6,
+)).quant_(4).stop;
+)
+
+(
+Pdef(\noen, Pbind(
+ \instrument, \sidrub,
+ \scale, ~scale,
+ \octave, 3,
+ \note, Prand([0, 3, 5], inf),
+ \cut, Pwhite(100, 4000, inf),
+ \rez, Pwhite(0.2, 0.8, inf),
+ \db, -5,
+ \dur, Prand([
+ Pseq([1], 1),
+ Pseq([1, 1].normalizeSum, 1),
+ Pseq([1, 1, 1, 1].normalizeSum, 1),
+ ], inf),
+ \legato, 0.7,
+)).quant_(4).stop;
+)
+
+(
+Pdef(\noci, Pbind(
+ \instrument, \sidrub,
+ \scale, ~scale,
+ \octave, 2,
+ \note, Prand([0, 3, 5], inf),
+ \cut, Pwhite(100, 4000, inf),
+ \rez, Pwhite(0.2, 0.8, inf),
+ \db, -10,
+ \dur, Prand([
+ Pseq([1], 1),
+ Pseq([1, 1].normalizeSum, 1),
+ Pseq([1, 1, 1, 1].normalizeSum, 1),
+ ], inf),
+ \legato, 2,
+)).quant_(4).stop;
+)
+
+(
+Pdef(\noni, Pbind(
+ \instrument, \siruse,
+ \scale, ~scale,
+ \octave, [3, 4],
+ \note, Prand([0], inf),
+ \db, -1,
+ \dur, 4,
+ \legato, 0.1,
+)).quant_(4).stop;
+)
+
+(
+// tania vocal
+Pdef(\vocal, ~se2.makeSynthBind <> Pbind(
+ \scale, ~scale,
+ \octave, 5,
+ \note, Pxrand([0, 1, 2, -3, -5], inf),
+ \dur, 16,
+ \db, 3,
+ \timingOffset, -2,
+)).quant_(4).stop;
+)
+
+(
+// tania vocal
+Pdef(\vocal2, ~se3.makeSynthBind <> Pbind(
+ \scale, ~scale,
+ \octave, 5,
+ \note, Pxrand([0, 1, 2, -3, -5], inf),
+ \dur, 1/2 * Prand([1, 3, 2, 4, 3], inf),
+ \db, -18,
+ \timingOffset, 0,
+)).quant_(4).stop;
+)
+
+(
+// axe sound
+Pdef(\vocal3, ~se4.makeSynthBind <> Pbind(
+ \scale, ~scale,
+ \octave, 4,
+ \note, Pxrand([5, 4, 6], inf),
+ \dur, 1 * Prand([4], inf),
+ \db, -15,
+ \timingOffset, -0.2,
+)).quant_(4).stop;
+)
+
+TempoClock.tempo = 160 / 60;
+
+~se3 = ~samplerFactory.value;
+
+(
+//(note: 9, octave: 5).play;
+~se3.startRec;
+)
+~se3.stopRec;
+
+~se3.shiftPos(0.05);
+~se3.duration = ~se.duration - 1;
+~se3.playSample;
+
+
+~se4 = ~samplerFactory.value;
+(
+//(note: 9, octave: 5).play;
+~se4.startRec;
+)
+~se4.stopRec;
+
+~se4.shiftPos(-0.05);
+~se4.duration = ~se4.duration - 1;
+~se4.playSample;
\ No newline at end of file