Hi,
Welcome to the forum!
It depends on whether you have a proper web server that can host your portfolio/website. If it’s the case, the sound file should be stored on that server.
Otherwise when you are developing a website you often do it locally on your machine because it’s easier. You could open your index.html
file (it’s the common name for the entry file of your website) but then you have problems when you want to load content from folders… The solution is to use a local web server (you have IDE plugins for VSCode or Atom and you also have this very simple useful command if you have python installed : python3 -m http.server
in the directory of your website)
This the basic structure of a simple website :
p5_website // The root directory of your website
├── css // Holding css files
│ └── style.css
├── index.html // The entry point to your website
├── js // Holding all js scripts
│ ├── lib // Holding js libraries (like p5)
│ │ └── p5.min.js
│ └── sketch.js // Your p5 sketch
└── media // All media files
├── img
└── sound
└── sound1.wav
6 directories, 5 files
(using the tree
command on linux)
Check object oriented programming in JS :
Read their API, looks like yes :
https://developers.soundcloud.com/docs/api/sdks#streaming
You can check out the processing.js project :
I think that OpenProcessing can help you share your project online :