Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

17.1: Loading and Playing - p5.js Sound Tutorial

144.8K views
•
June 7, 2016
by
The Coding Train
YouTube video player
17.1: Loading and Playing - p5.js Sound Tutorial

TL;DR

Learn how to load, play, and manipulate sound files in the browser using p5.js.

Transcript

hello and welcome to a few 5g really how about seven that was kind of pathetic but I just had to do it I'm gonna mute this right now what I have here is a p5 jazz sketch that is playing a sound file and this is a first video in a playlist series of videos about working with sound in p5 guess where we'll cover things from playing back music sound ef... Read More

Key Insights

  • 👂 Preload function in p5.js ensures sound files are fully loaded before the sketch executes.
  • ☠️ Adjusting playback rate in p5.js alters the speed and pitch of the sound file.
  • 👂 Using callbacks guarantees actions are triggered only after sound files have finished loading.
  • 🔇 Sliders in p5.js enable interactive manipulation of sound file parameters like volume, rate, and pan.
  • 🔇 The pan parameter shifts sound between left and right speakers in a stereo setup.
  • 👂 Manipulating multiple sound file parameters simultaneously enhances interactive control in p5.js sketches.
  • 🍵 Callbacks are essential for synchronization in handling asynchronous events in p5.js.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is the importance of using the preload function in p5.js for loading sound files?

The preload function in p5.js is specifically designed to ensure that sound files are fully loaded before any interactive elements of the sketch are executed in setup or draw.

Q: How can one adjust the playback rate and pan of a sound file in p5.js?

By using sliders in p5.js, the playback rate of a sound file can be adjusted to control its speed, and the pan can be manipulated to shift the sound between left and right speakers.

Q: What are the implications of using callbacks when loading sound files in p5.js?

Callbacks are crucial for triggering actions only after the sound file has finished loading, ensuring that any playback actions occur at the appropriate time without any errors.

Q: How can the volume, rate, and pan of a sound file be manipulated simultaneously in a p5.js sketch?

By utilizing sliders to adjust the volume, rate, and pan values in real-time, users can dynamically control the playback parameters of the sound file in the browser.

Summary & Key Takeaways

  • The video introduces the process of loading and playing sound files using the p5.js library.

  • It covers topics like loading mp3 files, using the loadSound function, and the importance of callbacks for ensuring sound file readiness.

  • The tutorial also demonstrates adjusting volume, rate, and pan of the sound files using sliders.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from The Coding Train 📚

9.4: Genetic Algorithm: Looking at Code - The Nature of Code thumbnail
9.4: Genetic Algorithm: Looking at Code - The Nature of Code
The Coding Train
8.1: Fractals - The Nature of Code thumbnail
8.1: Fractals - The Nature of Code
The Coding Train
ITP/IMA Winter Show 2018 thumbnail
ITP/IMA Winter Show 2018
The Coding Train
Computer Mouse Conference Demos! (node.js + tensorflow.js) thumbnail
Computer Mouse Conference Demos! (node.js + tensorflow.js)
The Coding Train
ITP/IMA Winter Show 2019 thumbnail
ITP/IMA Winter Show 2019
The Coding Train
Classifying Poses with ml5.js Part 2 thumbnail
Classifying Poses with ml5.js Part 2
The Coding Train

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.