Online Sequencer Forums

Full Version: JS Songs!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
- x^2 plus source code
- x^3
- 2^x
- x*43
- 3^x
- (7^x)%71
Write your own in the comments!
var j=Array(0);for(var i=0;i<8;i++){j.push(Math.floor(Math.random()*12));for(var k=0;k<5;k++){j.push(j[j.length-1]+5);j.push(j[j.length-1]+3);j.push(j[j.length-1]+4)}}for(var i=0;i<j.length;i++){song.addNote(new Note(song,piano[j[i]],i,1,0))} -->
var j=Array(0);var c=[5,3,4];var n=[1,3,5,8,10];for(var i=0;i<8;i++){j.push(n[Math.floor(Math.random()*n.length)]);for(var k=0;k<5;k++){for(var d=0;d<c.length;d++){j.push(j[j.length-1]+c[d])}}}for(var i=0;i<j.length;i++){song.addNote(new Note(song,piano[j[i]],i,1,0))} not very good