No module winsound

import winsound
not working
(but in IDLE it works)

Python Mode’s reference: Reference
is about Processing’s API (mostly the [u]PApplet[/u] class) w/ some of the basic Python’s API & syntax. :snake:

Notice that Python Mode is based on Jython, which is run by Java’s VM: Jython.org

Jython can import any Java library, plus a limited range of Python libraries: :coffee:
Jython.org/faq3.html

import processing.sound.*;

How do I use this syntax?

That is Java’s syntax, not Python’s! :roll_eyes:

Python Mode relies on add_library() in order to import Processing’s 3rd-party libraries: add_library('sound')

1 Like

thx, didnt know about that

I suggest installing the BEADS library, in Java, and read the “Evan Merz tutorial”. Works nicely with Processing.py

http://www.beadsproject.net
https://evanxmerz.com/blog/index.php/sonifying-processing/

add_library(‘beads’)

1 Like