«deta-nocturn» by LFSaw

on 21 Jan'24 23:50 in generativepiece

A piece experimenting with the settling of 8-bit programs running in BetaBlocker (Dave Griffith & Till Bovermann, 2011).

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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
q = ();
// either create new programs, or see already generated ones from the programs file
// q.programs = "%/DetaNocturn-programs.scd".format(Document.current.path.dirname).load;
 
// if new, also adjust score indices. (see below)
q.programs = {[\ORG] ++ ({([0, 1, 2] ++ (5..25)).choose}!250) ++ [\JMP, 1]}!200;
 
s.boot;
NdefMixer(s);
 
(
// put all programs into buffers. re-running these lines will start with a new set of programs that will -- over a long time period -- relax their amplitudes and complexity.
q.buffers = q.programs.collect{|prog|
  BBlockerProgram(prog).makeBuffer
};
 
// add specs
Spec.add(\rate, [1, 40000, \exp]);
)


Ndef(\deta).clear
(
// the score player
 
Tdef(\player).quant = nil;
Ndef(\deta).quant = nil;
Ndef(\deta).fadeTime = 0;
 
Tdef(\player, {
  var score = 48.collect{
    ([3, 11, 13, 17, 25, 26, 38, 4, 6, 8, 34, 38, 43, 44, 52, 71, 72, 85, 90]
    .scramble[0..7])
  };
  score.do{|a|
    Ndef(\deta, {|rate = 20000|
      Splay.ar((a.collect{|number|
        LeakDC.ar(Demand.ar(Impulse.ar(rate), 0, DetaBlockerBuf(q.buffers[number].bufnum, 0)))
      })).tanh
    }).play(fadeTime: 0);
    2.7.wait
  };
  Ndef(\deta).stop
})
)
 
Ndef(\deta).play
 
// start piece
{Ndef(\deta).set(\rate, 9965.3); Tdef(\player).reset.play;}.fork
 
// stop piece
Tdef(\player).stop; Ndef(\deta).stop
 
////////////// explore programs

// a saw wave generating program
q.bblocker = BBlockerProgram([\ORG, \INC, \INC, \JMP, 1]);
q.buf = q.bblocker.makeBuffer
 
Ndef(\deta, {|rate = 20000|
  Demand.ar(Impulse.ar(rate), 0, DetaBlockerBuf(q.buf.bufnum, 0)).tanh!8
});
 
Tdef(\ticker, {
  loop{
    q.programs.do({|prog, i|
      i.postln;
      BBlockerProgram(prog).fillBuffer(q.buf);
      1.wait;
    })
  }
})
 
Tdef(\ticker).stop
Tdef(\ticker).play
raw 1852 chars (focus & ctrl+a+c to copy)
reception
comments