tubeshowcase●1,069,538 videos♡ My collection 0
← Learn to Code

Learn to Code17:13

17.1: Loading and Playing - p5.js Sound Tutorial

The Coding Train ↗

From the creator

In this video series, I discuss the p5.js sound library to work with audio. In this first part, I demonstrate how to load a sound file and play it in the browser. Code: https://thecodingtrain.com/tracks/sound/sound/1-loading-and-playing 🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/yjCG9FncG 🎥 Next: https://youtu.be/YcezEwOXun4 References: 🔗 p5.sound library: https://p5js.org/reference/#/libraries/p5.sound 🔗 Visualizing Music with p5.js: https://github.com/therewasaguy/p5-music-viz 🔗 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 1:02 loading a mp3 file with loadSound() 3:57 Use preload to load the sound file 6:57 setVolume 7:36 Add a slider to control volume 9:34 Adding a callback 12:26 Manipulating the sound 13:34 Rate is the speed at which the song is playing 15:18 pan() determines whether you can hear the sound in the left/right speaker 16:43 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:/

Published 2016-06-07 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code