Getting live audio input

So I’m brand new to working with audio in any form, and I’m hoping you folks can point me in the right direction.
A DJ friend of mine wants my processing sketch to react to his audio. He said he could plug his output into my laptop and that it would show up as an “External sound card driver.”

I’m kind of at a loss to where I should go from here. The Sound library IO examples shows how to get live input from the microphone, but can anyone tell me how to get it from the sound card itself? And if so are you able to comment on connecting to an “External sound card driver?”

Many thanks!

1 Like

Hello,

New is a good place to start…

This is in the resources below:

Also check out the libraries available in the Processing PDE.

One of the best tools in a programmer’s tool chest is knowing the resources available to you and learning to navigate, filter, and use them.

A short list of resources to peruse:

Resources < Click here to expand !

Explore the resources available here:

:)

1 Like

Thanks for the reply :slight_smile:
I’m definitely going to be doing a lot of studying on the subject (Thank you for the resources), but I was hoping in the mean time someone would be able to point out a simple class or method to get me started. Like maybe there’s a simple way to to get AudioIn to listen to the soundcard instead of the mic.
But I guess I’ll get to reading and figure it out for myself.
Cheers!

2 Likes

Hello,

https://processing.org/reference/libraries/sound/Sound.html

import processing.sound.*;

void setup() 
  {
  println (Sound.list());
  }

OR

import processing.sound.*;
Sound lalala;

void setup() 
  {
  println (lalala.list());
  }

:)

Thank you! That’s quite helpful. Switching AudioIn to any of the other id’s still doesn’t seem to work, but I’m sure there’s some little detail I’m missing that I’ll find after some reading.

1 Like

Hello,

I tried this and it did not work:
https://www.processing.org/reference/libraries/sound/FFT_input_.html

Details < Expand this!

image

image

Some investigation and I discovered my Stereo Mix was Disabled.

I Enabled the Stereo Mix and it does work now!

Details < Expand this!

image

image

I disconnected my USB microphone (part of camera) as a first step so it is not in list.

:)

Can you guess which song I was playing?

image

2 Likes

That did it!
Man, I can’t tell you how long that would have taken me to troubleshoot. Definitely not the first place I would have started looking. (Like I said, new to audio XD)
Thank you so much for taking the time to help!

ps - I know exactly what song you were playing. If only I could remember the name…

1 Like

Hello,

You are very welcome!

She can really hit those highs!

:)