Play a Sound in the Browser with p5.js
Автор: Nicholas Brown
Загружено: 2023-05-04
Просмотров: 1088
🔉 Learn how to play a sound file in the browser using #p5js. Discover how to develop your coding skills by writing pseudocode in plain language before you write any computer code. #creativecoding
You can try out the sketch online, here:
https://editor.p5js.org/nicholasbrown...
📩 Join my newsletter to receive tutorials, tips, and updates on creative projects straight to your inbox: https://ngbrown.ck.page/f39c6fa361
📬 Subscribe to my Substack for reflective writing on creative technology and culture: https://nicholasbrown.substack.com
⏰ TIMESTAMPS ⏰
00:00 - Intro
00:09 - What we're going to do
00:18 - How to write an algorithm
00:30 - Writing the programme in pseudocode
01:31 - STEP 1: Storing the sound in memory (variables)
01:51 - STEP 2: Load the sound file into memory (preload() function)
02:56 - STEP 3: Playing the sound on mouse click (the play() method)
03:41 - STEP 4: Stop the sound on key press
03:53 - Testing in the browser
Subscribe to this channel for more on p5.js and other creative technologies: / @n_g_brown
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: