var wave = require('../lib/wave'); var squa = require('../lib/square'); var soft = require('../lib/softsq');
var a = 1 / 2;
function voice(f, t) { return wave(f, t) + 1 / 10 * wave(f * 3, t); }
function bass1(t) { return soft(1, t) * voice(60, t); }
function bass2(t) { return soft(1, t + 0.5) * soft(3, t + 0.5) * voice(55 * 1.3333, t); }
return function(t, i) { return a * ( 0 + 0.2 * bass1(t) + 0.2 * bass2(t)
+ 1.0 * squa(1/20, t) * squa(10, t) * squa(10.5, t) * voice(440, t) + 1.0 * squa(1/20.1, t+30) * squa(10, t) * squa(10.5, t) * voice(473, t)
+ 0.25 * squa(1.3, t) * squa(1.4, t) * squa(1.401, t) * squa(100, t) * squa(101, t) * squa(102, t) * squa(103, t) * voice(440, t)
+ 0.15 * squa(1.1, t) * squa(1.2, t) * squa(1.201, t) * squa(100, t+1.43) * squa(101, t+1.43) * squa(102, t+1.43) * squa(103, t+1.43) * squa(104, t+1.43) * voice(1000, t)
+ 0.001 * squa(400, t+1.43) * squa(402, t+1.43) * squa(404, t+1.43) * squa(406, t+1.43) * squa(408, t+1.43) * squa(410, t+1.43) * voice(2000, t) ); } var wave = require ('../ lib / wave'); var squa = require ('../ lib / square'); var soft = require ('../ lib / softsq');
var a = 1/2;
функциональный голос (ф, т) { возвратная волна (f, t) + 1/10 * волна (f * 3, t); }
function bass1 (t) { return soft (1, t) * voice (60, t); }
function bass2 (t) { вернуть soft (1, t + 0.5) * soft (3, t + 0.5) * voice (55 * 1.3333, t); }
return function (t, i) { вернуть * ( 0 + 0,2 * бас1 (т) + 0,2 * бас2 (т)
+ 1.0 * squa (1/20, t) * squa (10, t) * squa (10,5, t) * голос (440, t) + 1.0 * squa (1 / 20,1, t + 30) * squa (10, t) * squa (10,5, t) * голос (473, t)
+ 0,25 * сква (1,3, т) * squa (1,4, т) * сква (1.401, т) * squa (100, т) * squa (101, т) * сква (102, т) * сква (103, т) * голос (440, т)
+ 0,15 * squa (1.1, т) * сква (1,2, т) * сква (1,201, т) * сква (100, т + 1,43) * сква (101, t + 1,43) * сква (102, т + 1,43) * сква (103, t + 1,43) * сква (104, t + 1,43) * голос (1000, т)
+ 0,001 * сква (400, т + 1,43) * сква (402, т + 1,43) * сква (404, т + 1,43) * сква (406, т + 1,43) * сква (408, т + 1,43) * сква (410, т + 1,43) * голос (2000, т) ); } Смотрите также: | |