From 3f0a7ade8fd503adcd71c9a646065e4dccd8b85e Mon Sep 17 00:00:00 2001 From: jm-rives Date: Mon, 21 Nov 2016 15:31:35 -0800 Subject: [PATCH 1/5] INITIAL Commit --- index.html | 14 +++++++------- noise.js | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 2023809..a92c362 100644 --- a/index.html +++ b/index.html @@ -46,13 +46,13 @@
- - - - - - - + + + + + + +
diff --git a/noise.js b/noise.js index 1d6dd4b..c28b6de 100644 --- a/noise.js +++ b/noise.js @@ -1,3 +1,16 @@ +'use strict' + +console.log("Nothings happend yet."); + $(document).ready( function() { - // your code here + console.log("Inside the first fxn, nothings happened yet either"); + + $('div.instrument > .note_c').click(function(){ + console.log("Inside .click() fxn"); + $('div.audio > cAudio')[0].play(); + console.log("Did that thing happen? NOPE"); + }); }); + // $('div.instrument > note c').click()function()) { + // alert("That thing you wanted to work WERKED!") + // }) \ No newline at end of file From 832690febf0ea3a21154e2f27241b9b6712b1a2f Mon Sep 17 00:00:00 2001 From: jm-rives Date: Mon, 21 Nov 2016 16:23:47 -0800 Subject: [PATCH 2/5] ADD working 'C' note' --- noise.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/noise.js b/noise.js index c28b6de..a3cf882 100644 --- a/noise.js +++ b/noise.js @@ -7,7 +7,25 @@ $(document).ready( function() { $('div.instrument > .note_c').click(function(){ console.log("Inside .click() fxn"); - $('div.audio > cAudio')[0].play(); + + var cNote = $('div#audio_embeds > #cAudio')[0]; + + cNote.play(); + + // noteC.addEventListener('ended', function() { + // this.currentTime = 0; + // this.play(); + // }, false); + + // $('#play').click(function() { + // noteC.play(); + // }); + + // $('#pause').click(function() { + // noteC.pause(); + // }); + + console.log("Did that thing happen? NOPE"); }); }); From 9cd9da1afab746dd6318bf2db7d45560dd572238 Mon Sep 17 00:00:00 2001 From: jm-rives Date: Mon, 21 Nov 2016 16:30:48 -0800 Subject: [PATCH 3/5] ADD working 'D' & 'E' note. --- noise.js | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/noise.js b/noise.js index a3cf882..4ffc729 100644 --- a/noise.js +++ b/noise.js @@ -1,18 +1,33 @@ 'use strict' -console.log("Nothings happend yet."); - $(document).ready( function() { - console.log("Inside the first fxn, nothings happened yet either"); + $('div.instrument > .note_c').click(function(){ - console.log("Inside .click() fxn"); var cNote = $('div#audio_embeds > #cAudio')[0]; - cNote.play(); - - // noteC.addEventListener('ended', function() { + }); + + $('div.instrument > .note_d').click(function(){ + + var dNote = $('div#audio_embeds > #dAudio')[0]; + dNote.play(); + }); + + $('div.instrument > .note_e').click(function(){ + + var eNote = $('div#audio_embeds > #eAudio')[0]; + eNote.play(); + }); + + +}); + // $('div.instrument > note c').click()function()) { + // alert("That thing you wanted to work WERKED!") + // }) + + // noteC.addEventListener('ended', function() { // this.currentTime = 0; // this.play(); // }, false); @@ -24,11 +39,3 @@ $(document).ready( function() { // $('#pause').click(function() { // noteC.pause(); // }); - - - console.log("Did that thing happen? NOPE"); - }); -}); - // $('div.instrument > note c').click()function()) { - // alert("That thing you wanted to work WERKED!") - // }) \ No newline at end of file From 92691567e96f5eeda409d89c5ecd798465a6da83 Mon Sep 17 00:00:00 2001 From: jm-rives Date: Mon, 21 Nov 2016 16:35:16 -0800 Subject: [PATCH 4/5] ADD working 'F' & 'G' keys --- noise.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/noise.js b/noise.js index 4ffc729..58c1ee7 100644 --- a/noise.js +++ b/noise.js @@ -21,6 +21,18 @@ $(document).ready( function() { eNote.play(); }); + $('div.instrument > .note_f').click(function(){ + + var fNote = $('div#audio_embeds > #fAudio')[0]; + fNote.play(); + }); + + $('div.instrument > .note_g').click(function(){ + + var gNote = $('div#audio_embeds > #gAudio')[0]; + gNote.play(); + }); + }); // $('div.instrument > note c').click()function()) { From b2399be82665ba058e0afce06c3ea6abfe2ef5d5 Mon Sep 17 00:00:00 2001 From: jm-rives Date: Mon, 21 Nov 2016 16:41:25 -0800 Subject: [PATCH 5/5] ADD working 'A' & 'B' notes --- noise.js | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/noise.js b/noise.js index 58c1ee7..ab21932 100644 --- a/noise.js +++ b/noise.js @@ -21,33 +21,29 @@ $(document).ready( function() { eNote.play(); }); - $('div.instrument > .note_f').click(function(){ + $('div.instrument > .note_f').click(function(){ var fNote = $('div#audio_embeds > #fAudio')[0]; fNote.play(); }); - $('div.instrument > .note_g').click(function(){ + $('div.instrument > .note_g').click(function(){ var gNote = $('div#audio_embeds > #gAudio')[0]; gNote.play(); }); + $('div.instrument > .note_a').click(function(){ + var aNote = $('div#audio_embeds > #aAudio')[0]; + aNote.play(); + }); + + $('div.instrument > .note_b').click(function(){ + + var bNote = $('div#audio_embeds > #bAudio')[0]; + bNote.play(); + }); }); - // $('div.instrument > note c').click()function()) { - // alert("That thing you wanted to work WERKED!") - // }) - - // noteC.addEventListener('ended', function() { - // this.currentTime = 0; - // this.play(); - // }, false); - - // $('#play').click(function() { - // noteC.play(); - // }); - - // $('#pause').click(function() { - // noteC.pause(); - // }); + + // TODO JM-RIVES FIX broken CSS/ HTML