Not sure why these codes don’t work, there is an error message [mismatched input ‘*’ expecting set null] I have installed the sound library and add the mp3 in the sketch folder… Anyone can do me a favor ;(
file = new SoundFile(this, "chopin.mp3");
Make sure that you
Load a soundfile from the /data folder of the sketch and your file name chopin.mp3 with same format
Also you can try and test the library examples
Note that in general void setup run just once with out loop
This has happened to me before with the Processing IDE as I sometimes switch between modes (Java, Python, p5.js).
This is Java code and I suspect you may be running it in Python mode:
Go to the upper right of screen and change to Java mode and it works:
Thanks a lot, I really had no idea it’s about the mode… May I ask do you know how to write the python version of it
Because it seems I couldn’t search the python code online
I only dabble with Python and not able to help with this (adding sound) at this time.
I searched in this forum for:
There are some topics.
I was not successful playing anything with my initial efforts.
thank you so much for your effort !!!
Have a nice day