question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sound examples don't work, error with p5.sound functions undefined

See original GitHub issue

Most appropriate sections of the p5.js website?

Examples

What is your operating system?

Windows

Web browser and version

Firefox 103.0.1

Actual Behavior

When you load any of the Sound examples (for example https://p5js.org/examples/sound-preload-soundfile.html), it does not work.

Browser console shows Uncaught ReferenceError: loadSound is not defined.

I’ve looked at #1141 but it seems to be an unrelated issue, and have tried different networks / phones. Have tried a hard refresh. I do not have a VPN or use Internet proxy.

In my Network tab in the Inspector, I do see p5.sound.min.js is loaded with 200 OK, so I’m not sure why this is happening.

Expected Behavior

The sound examples should work.

Steps to reproduce

  1. Open https://p5js.org/examples/sound-preload-soundfile.html
  2. Notice the sound example never loads, console shows error

Would you like to work on the issue?

No, I’m not sure what the actual problem is.

Edit: I found the problem. It’s upstream server.

image

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
limzykennethcommented, Aug 14, 2022

@Qianqianye I’ve just done the temporary fix and everything should be back up now.

1reaction
limzykennethcommented, Aug 11, 2022

This is due to #1133 which I completely forgot about and the new release broke the library files again. @Qianqianye

Read more comments on GitHub >

github_iconTop Results From Across the Web

p5 is not defined when trying to use p5.js-sound in v1.0.0 #453
Really looks like webpack issue. No context contains a variable called "p5". sound and sound.min equally affected. Currently solved by ...
Read more >
p5.sound.js audioBuffer is undefined - Stack Overflow
It sounds a little weird but the implementation of p5.js requires that you instantiate its class to make it work.
Read more >
I can't seem to play sounds in javascript using p5.js - Libraries
I am new to Js, and p5 and I was trying to play a mp3 from my computer, but I continually get this...
Read more >
reference | loadSound() - P5.js
If called during preload(), the p5.SoundFile will be ready to play in time for setup() and draw(). If called outside of preload, the...
Read more >
Can't play audio file with P5.Tone.js - Google Groups
i would first try updating to the latest Tone.js and p5.Tone.js shim (found in the examples/scripts folder of the repo) and see if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found