We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello there, I'm a newscomer in the Processing world. I'm embarrassed, i've got a little question :
I would like to get simply the audio signal of my computer directly transmitted in a Processing Sketch. Example : supposing that i've a video playing (with audio indeed) in VLC or Quicktime. I would like to get (to retrieve) the sound that i hear directly into Processing. How can i achieve that ?
Best E'
Answers
did you look at the library minim?
see libraries on the processing main page.
you can play a mp3, I don't know if it can listen to the other programs though.
;-)
Hello Chrisir, Yes, thanks for your help and for the tricks ! Best
Processing's default audio library is called minim, the best you can do is have a look at the examples that come with it. You can't select which audio device it uses, it always uses the OS default audio device which means you need to change your default audio recording device to the one which is the sum of all sounds played rather than for example the microphone. On my system (windows 7) I right click the speaker icon, click select input devices and change default recording device to Stereo Mix. This device's name can be different for your system, it's also sometimes called along the lines of WhatYouHear.
Hi colouredmirrorball, I found a way by installing soundflower on mac OSX which let me route the audio signal flawlessly threw any of the input. So it's Ok now.
But, got now another problem : I would like to create conditions to display several PGraphics forms with Minim when for example, I use the Midibus library or when i hit some letters on my keyboard. How can i code that ?
Here's a sample of my sketch :
Let's say for example : when i play a C3 note, i would like to hide the Generated Form 01 and reveal the Generated Form 02, or when i play C4, i would like to play both of them, or when i play A2 i would like to hide Generated Form 01 and 02 and reveal the simple animated Form 03).
Or, hit key "S", "C", and so on. A way to create various display of the PGraphics.
Do you know how can I achieve that ? Ideas welcome… Best Crem'
Can you, for example, do a println() when you receive a MIDI note? MidiBus has an example that does this. Try to incorporate that in your project and work from there.