2 summary:: physical model of bouncing object
3 categories:: UGens>Filters>Nonlinear, UGens>Generators>PhysicalModels
4 related:: Classes/Ball, Classes/Spring
7 models the impacts of a bouncing object that is reflected by a vibrating surface
14 modulated surface level
23 proximity from which on attraction to surface starts
27 // mouse x controls switch of level
28 // mouse y controls gravity
32 sf = K2A.ar(MouseX.kr > 0.5) > 0;
33 t = TBall.ar(sf, MouseY.kr(0.01, 1.0, 1), 0.01);
34 Pan2.ar(Ringz.ar(t * 10, 1200, 0.1), MouseX.kr(-1,1));
39 // mouse x controls step noise modulation rate
40 // mouse y controls gravity
44 sf = LFNoise0.ar(MouseX.kr(0.5, 100, 1));
45 g = MouseY.kr(0.01, 10, 1);
46 t = TBall.ar(sf, g, 0.01, 0.002);
47 Ringz.ar(t * 4, [600, 645], 0.3);
51 // mouse x controls sine modulation rate
52 // mouse y controls friction
53 // gravity changes slowly
57 fr = MouseX.kr(1, 1000, 1);
58 h = MouseY.kr(0.0001, 0.001, 1);
59 g = LFNoise1.kr(0.1, 3, 5);
60 f = TBall.ar(SinOsc.ar(fr), g, 0.1, h);
61 Pan2.ar(Ringz.ar(f, 1400, 0.04),0,5)
65 // sine frequency rate is modulated with a slow sine
66 // mouse y controls friction
67 // mouse x controls gravity
71 fr = LinExp.kr(SinOsc.kr(0.1), -1, 1, 1, 600);
72 h = MouseY.kr(0.0001, 0.001, 1);
74 f = TBall.ar(SinOsc.ar(fr), g, 0.1, h);
75 Pan2.ar(Ringz.ar(f, 1400, 0.04),0,5)
79 // this is no mbira: vibrations of a bank of resonators that are
80 // triggered by some bouncing things that bounce one on each resonator
82 // mouse y controls friction
83 // mouse x controls gravity
86 var sc, g, d, z, lfo, rate;
87 g = MouseX.kr(0.01, 100, 1);
88 d = MouseY.kr(0.00001, 0.2);
89 sc = #[451, 495.5, 595, 676, 734.5]; //azande harp tuning by B. Guinahui
90 lfo = LFNoise1.kr(1, 0.005, 1);
92 rate = rate * sc.size.reciprocal;
93 z = sc.collect { |u,i|
96 Mix(Impulse.ar(rate, [1.0, LFNoise0.kr(rate / 12)].rand, 0.1)), 0.001
99 Array.fill(4, { |i| (i+1) + 0.1.rand2 }) / 2
100 * Decay.ar(in,0.02,rand(0.5,1), lfo) * u,
101 Array.exprand(4, 0.2, 1).sort
104 f = TBall.ar(in * 10, g, d, 0.001);
106 in + Mix(Ringz.ar(f, u * Array.fill(4, { |i| (i+1) + 0.3.rand2 }) * 2, 0.1))