Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(args){
- return function(){
- if (soundNumber != 0) return;
- for(var i in args) {
- if (args[0].buttonToggle == true){
- console.log(args[2]);
- args[1].currentTime = 0;
- args[1].play();
- }
- }
- }
- })([[buttonC_1, soundC, "c note"]
- , [buttonD_1, soundD, "d note"]
- , [buttonF_1, soundF, "f note"]
- , [buttonG_1, soundG, "g note"]
- , [buttonA_1, soundA, "a note"]]);
- /* function playNote1(){
- if (soundNumber == 0){
- if (buttonC_1.buttonToggle == true){
- console.log("c note");
- soundC.currentTime = 0;
- soundC.play();
- }
- if (buttonD_1.buttonToggle == true){
- console.log("d note");
- soundD.currentTime = 0;
- soundD.play();
- }
- if (buttonF_1.buttonToggle == true){
- console.log("f note");
- soundF.currentTime = 0;
- soundF.play();
- }
- if (buttonG_1.buttonToggle == true){
- console.log("g note");
- soundG.currentTime = 0;
- soundG.play();
- }
- if (buttonA_1.buttonToggle == true){
- console.log("a note");
- soundA.currentTime = 0;
- soundA.play();
- }
- }
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement