Hi. I am trying to create a drawing tool that then takes the input from the microphone and applies a visual effect to the drawing in relation to the amplitude of the input.
However I can’t get the microphone to work. I am using processing.py 3 and the Sound library. I am opening with this code but getting 0.0 response in the console when I am playing music…
add_library('sound') mic = None amp = None def setup(): global mic, amp size(440, 440) background(0) mic = AudioIn(this, 2) mic.start() amp = Amplitude(this) amp.input(mic) def draw(): print(amp.analyze())
Is anyone able to point out where I am going wrong here? Or could you please point me in the right direction for some processing.py sound input examples? Thank you!!