Needed to comment out the line with p5.sound to make sketch work ok
p5.js version
1.9.4
Web browser and version
142.0.7444.60 (Official Build) (x86_64)
Operating system
MacOSX/Android
Steps to reproduce this
Hi, just wanted to document this in case it's useful. The sketch worked fine for several browser and webserver combinations. But for chrome and one of the webservers it didn't, which was confusing for a beginner like me.
Did fix it, by commenting out the second line here. With second line commented out it works for all browser and webserver combinations. BTW this code came from an example, it's basically my first p5js sketch and this code is from the example I started with:)
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.9.4/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.9.4/addons/p5.sound.min.js"></script>
Cheers, Noah
Hi @statespacedev can you please assign this issue to me if you are not working on this?
for sure! was only reporting this, not able to work on it myself:)
hmmm, not seeing a way to assign the issue to you, am i able to do that from this end?:)
No problem @statespacedev, Only maintainers can assign issues, so you’ll need to ask one of them to assign it. I’ll start looking into it meanwhile.
Hi @statespacedev, thanks for reporting this and welcome to p5! I'm one of the maintainers.
Could you share which example, please? I'd like to look into whether the example itself needs to be updated. Some of the examples are coming from the reference in this repository, but some are maintained on the website repository. Once it's more clear where the bug can be fixed I'm happy to assign it.
Hi @ksen0, thanks! Have been thinking about this and trying to find exactly how where when I got the example code. For sure it was the JSON example. Some variant of this example was for sure what I started with because reading a json file was the core first step for me https://p5js.org/examples/loading-and-saving-data-json/
can also say for certain that this commit right here is where those two lines came in https://gitlab.com/decwar/galaxy/-/blob/8ccfd0e7787639f682b4686a6bd78f812ba9799d/index.html
but unfortunately I can't remember exactly were I copy pasted those from. I remember it was confusing because there were at least two versions of the json example, and there were some bugs in the code and was wrestling with getting the code working here for me. Did get that working ok within a few hours, but it was a confused trial and error thing.
Hope this help enough? Cheers, Noah
Ahha! I accidentally stumbled onto where i copied the example!:) Advanced Data: Load Saved JSON copy https://editor.p5js.org/noah-smith/sketches/0dRsXtE2t
Hello @ksen0 I’d like to look into this issue and investigate why including p5.sound causes the sketch to fail across certain browsers and web server combinations. I’ll try to reproduce the behaviour on Chrome and other browsers and explore whether it’s related to how p5.sound is being initialised or loaded in version 1.9.4.
Could I get this issue assigned to me?