drums uses all limbs

master
Matthew Huntington 3 years ago
parent 2ca96d0177
commit 104b6f0880

@ -1,16 +1,22 @@
const numBeats = Math.ceil(Math.random()*9); const numBeats = Math.ceil(Math.random()*9);
let resultString = ''; let resultString = '';
const instructionPosibilities = [ 'n', 'p', 'm', 'b' ] const appendages = [ 'lh', 'rh', 'lf', 'rf' ];
for(let i = 1; i <= numBeats; i++){ for(let appendage of appendages){
const instructionIndex = Math.floor(Math.random()*instructionPosibilities.length); let resultString = '';
for(let i = 1; i <= numBeats; i++){
const hit = Math.floor(Math.random()*2);
if(hit === 1){
resultString += appendage + ' ';
} else {
resultString += ' ';
}
resultString += instructionPosibilities[instructionIndex] + ' '; }
console.log(resultString);
} }
console.log(resultString);
const breakDown = (node)=>{ const breakDown = (node)=>{
if(node.value < 4){ if(node.value < 4){

Loading…
Cancel
Save