23:2417.2: Play and Pause Button - p5.js Sound Tutorial
From the creator
In Part 2 of the Sound with p5.js series, I show you how to add a button to the DOM capable of playing and stopping the playback of a sound file. Code: https://thecodingtrain.com/tracks/sound/sound/2-pause-and-play-button 🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/3Z_lRpu2y 🎥 Previous: https://youtu.be/Pn1g1wjxl_0 🎥 Next: https://youtu.be/SfA5CghXw18 References: 🔗 p5.sound library: https://p5js.org/reference/#/libraries/p5.sound 🔗 Just Like a Rainbow by the Columbians: https://github.com/CodingTrain/website-archive/blob/main/Tutorials/P5JS/p5.js_sound/17.1_playSong/rainbow.mp3 Timestamps: 0:00 Introduction 0:25 There must be a reference to the p5.Sound library 1:38 Add a button to start/stop song 2:03 Write a function that will control the playback of the song 5:50 stop() versus pause() 6:00 Outro Editing by Mathieu Blanchette Animations by Jason Heglund Music from Epidemic Sound 🚂 Website: https://thecodingtrain.com/ 👾 Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide 🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box 💡 GitHub: https://github.com/CodingTrain 💬 Discord: https://thecodingtrain.com/discord 💖 Membership: http://youtube.com/thecodingtrain/join 🛒 Store: https://standard.tv/codingtrain 🖋️ Twitter: https://twitter.com/thecodingtrain 📸 Instagram: https://www.instagram.com/the.coding.train/ 🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH 🎥 Intr
Published 2016-06-08 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





