Nice tutorial I did the display getting the argument of the play function this way: function play(str) { let string = arguments[0] document.getElementById("display").innerText = string let audio = document.getElementById(str); audio.currentTime = 0; audio.play(); } I added " audio.currentTime = 0 " so you can hear the samples more quickly if you repeat the sample :)
@@UsefulProgrammer nickcodes86.github.io/drumMachine/ it could use some more love but ive been having some health problems and haven't been able to dedicate as much time as I'd like to as of late! For some reason on cellphones the phone has to be turned to align properly, didnt have much time to look into how to figure it out. Looking forward to doing the JS calculator
YOU GOT THE RIGHT NAME BUDDY 'USEFUL' ! I just have a little problem is that my buttons doesn't take the whole space as yours do, I am working with Bootstrap too, I've inserted the classes btn btn-primary and btn-block, but it just take the width of what it holds which is a single letter, if you could help me out I'll be super grateful, thank you for the real live code
Great video! Here another way to make the sounds play on click button : const buttonsDrums = document.querySelectorAll(".drum-pad") buttonsDrums.forEach(function (btn) { btn.addEventListener("click", function (e) { const audio = e.target.firstChild.nextSibling; audio.play(); }) })
Your lessons are always helpful thanks a lot Mr. Ian.
Even though no one appreciates you brother! We are!!! -Programmers!!!
Nice tutorial I did the display getting the argument of the play function this way:
function play(str) {
let string = arguments[0]
document.getElementById("display").innerText = string
let audio = document.getElementById(str);
audio.currentTime = 0;
audio.play();
}
I added " audio.currentTime = 0 " so you can hear the samples more quickly if you repeat the sample :)
I know Its kinda bad doing this anyways...
Kick ass video brother! I spent an extra day churching mine up a bit but this video really helped me out so much thank you!
Awesome Nick. Please link to your project here so I can take a look.
@@UsefulProgrammer I will when I get back home! It almost mimics yours lol but i didn't do quotes I did drum sounds 😁
@@UsefulProgrammer nickcodes86.github.io/drumMachine/ it could use some more love but ive been having some health problems and haven't been able to dedicate as much time as I'd like to as of late! For some reason on cellphones the phone has to be turned to align properly, didnt have much time to look into how to figure it out. Looking forward to doing the JS calculator
Nice work Nick!
@@UsefulProgrammer Thanks! Hoping to get a better grip on everything as i spend more time with this stuff! Just started back in the end of June
YOU GOT THE RIGHT NAME BUDDY 'USEFUL' ! I just have a little problem is that my buttons doesn't take the whole space as yours do, I am working with Bootstrap too, I've inserted the classes btn btn-primary and btn-block, but it just take the width of what it holds which is a single letter, if you could help me out I'll be super grateful, thank you for the real live code
Instead of using class = "btn-block" on each button, try wrapping your entire button element with .
@@DavePueyoCarter Thanks bro you're a hero
2021 and it still helps! thanks man!
Great Job
Thank you for watching Ayush.
Excellent, thank you!
Thanks so much!
Thank you for watching.
Great video! Here another way to make the sounds play on click button :
const buttonsDrums = document.querySelectorAll(".drum-pad")
buttonsDrums.forEach(function (btn) {
btn.addEventListener("click", function (e) {
const audio = e.target.firstChild.nextSibling;
audio.play();
})
})
great content!
Wait your thing still has keystrokes at the end of the video.
Huh?
Hello, How to write the same code on different lines?
with "Alt" button
you need to use react
What is the name of your editor????
Atom
OMG I realized what I did
Awesome.