~oilfield = Server.local.boot; ~oilfield.quit; ( ~oilfield.sendMsg("/g_new", ~song2sa = 2100, 1, 0); ~root2 = 27.5 * (2 ** (5 / 12)); ) ~oilfield.sendMsg("/n_set", 0, "freq", ~root2); ~oilfield.sendMsg("/n_set", 0, "cov", 10); ~oilfield.sendMsg("/n_set", 0, "den", 50); ~oilfield.sendMsg("/n_set", 0, "cov", 10, "den", 50); ~oilfield.sendMsg("/n_set", ~song2sa, "freq", ~root2); ~oilfield.sendMsg("/n_set", ~song2sa, "cov", 10); ~oilfield.sendMsg("/n_set", ~song2sa, "den", 50); ~oilfield.sendMsg("/n_set", ~song2sa, "cov", 10, "den", 50); ( ~oilfield.sendMsg("/s_new", "song2sa", ~song2sasa = 2110, 1, ~song2sa, "freq", ~root2, "cov", 30, "den", 30); ~oilfield.sendMsg("/s_new", "song2sa", ~song2sari = 2120, 1, ~song2sa, "freq", ~root2 * (9 / 8), "cov", 30, "den", 30); ~oilfield.sendMsg("/s_new", "song2sa", ~song2sama = 2140, 1, ~song2sa, "freq", ~root2, "cov", 30, "den", 30); ~oilfield.sendMsg("/s_new", "song2sa", ~song2sani = 2170, 1, ~song2sa, "freq", ~root2 * (11 / 8), "cov", 30, "den", 30); ) ( ~oilfield.sendMsg("/n_set", ~song2sasa, "freq", ~root2, "cov", 70, "den", 50); ~oilfield.sendMsg("/n_set", ~song2sari, "freq", ~root2 * (9 / 8) *2, "cov", 20, "den", 30); ~oilfield.sendMsg("/n_set", ~song2sama, "freq", ~root2, "cov", 70, "den", 50); ~oilfield.sendMsg("/n_set", ~song2sani, "freq", ~root2 * (11 / 8), "cov", 70, "den", 50); ) ( ~oilfield.sendMsg("/n_free", ~song2sasa); ~oilfield.sendMsg("/n_free", ~song2sari); ~oilfield.sendMsg("/n_free", ~song2sama); ~oilfield.sendMsg("/n_free", ~song2sani); ) =============== ( SynthDef("song2sa", {arg freq, cov, den; var hz, vol, phase, osc, here, lifecycle, trig; hz = [7,8,9] * freq / 8; phase = (2.5 - (cov / 100)) * pi; vol = 1 / (1 - phase.sin); lifecycle = ((den / 100) / 3) * SinOsc.kr(hz / 30, phase, vol, 0 - (vol * phase.sin)); trig = lifecycle > 0; here = [0, 0.6pi, 1.2pi]; osc = SinOsc.ar(hz, here, trig * lifecycle).sum; Out.ar(0,[osc,osc]); }).load(~oilfield); )