Add Цигофё
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Mon, 14 Aug 2023 19:15:30 +0000 (21:15 +0200)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Mon, 14 Aug 2023 19:15:30 +0000 (21:15 +0200)
Ка/Кавюц-Цигофё/Цигофё-инит.scd [new file with mode: 0644]
Ка/Кавюц-Цигофё/Цигофё-песня.scd [new file with mode: 0644]
Ка/Кавюц-Цигофё/Цигофё-синты.scd [new file with mode: 0644]

diff --git a/Ка/Кавюц-Цигофё/Цигофё-инит.scd b/Ка/Кавюц-Цигофё/Цигофё-инит.scd
new file mode 100644 (file)
index 0000000..0d384f5
--- /dev/null
@@ -0,0 +1,17 @@
+(
+// initialization
+ServerTree.removeAll;
+
+~tempo = 94;
+~bpb = 4;
+
+ServerTree.add({
+  "Init vars:".postln;
+  (
+    tempo: TempoClock.tempo_(~tempo / 60).tempo,
+    beatsPerBar: TempoClock.schedAbs(TempoClock.nextBar, {
+      thisThread.clock.beatsPerBar_(~bpb)
+    }).beatsPerBar
+  ).postln;
+});
+)
diff --git a/Ка/Кавюц-Цигофё/Цигофё-песня.scd b/Ка/Кавюц-Цигофё/Цигофё-песня.scd
new file mode 100644 (file)
index 0000000..eac08f3
--- /dev/null
@@ -0,0 +1,34 @@
+(
+~loop = Pbind(*[
+  instrument:
+]);
+
+~song = Ptpar([
+  0, ~loop,
+], inf);
+
+Pdef(\song, ~song).quant_(~bpb).play;
+)
+// send to ableton
+~ableton.allNotesOff(0);
+~ableton = MIDIOut.newByName("IAC Driver", "Bus 2").latency_(s.latency);
+
+
+(
+~gamma = [0, 2, 4, 5, 7, 9, 11, 12].scramble;
+~drums = (36..51).scramble;
+~beat = ~makeBeat.(7, dur: 8, db: 0);
+Pdef(\pobitopy, Pbind(*[
+  type: \midi,
+  midiout: ~ableton,
+  chan: 0,
+  midicmd: \noteOn,
+  midinote: Pshuf(~gamma.wrapExtend(~beat.size)+24, inf),
+  #[\dur, \dummy3, \db, \dummy1, \dummy2]: Pseq(
+    ~beat, inf,
+  ),
+  hasGate: true,
+])).quant_(4).play;
+)
+
+Pdef(\pobitopy).stop;
\ No newline at end of file
diff --git a/Ка/Кавюц-Цигофё/Цигофё-синты.scd b/Ка/Кавюц-Цигофё/Цигофё-синты.scd
new file mode 100644 (file)
index 0000000..5023ba2
--- /dev/null
@@ -0,0 +1,21 @@
+(
+SynthDef(\zuqufucu, {|
+  out = 0,
+  sustain = 0.5,
+  freq = 440,
+  amp = 1,
+  cut = 800,
+  rez = 0.8,
+  modFreqMin = 7,
+  modFreqMax = 12,
+  modAmp = 0.01
+  |
+  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(sustain*0.1, releaseTime: sustain*0.9), doneAction: 2);
+  sig = Pan2.ar(sig, Rand(-0.3, 0.3));
+  Out.ar(out, sig * amp);
+}).add;
+)
\ No newline at end of file