Audio input/output routing with external sound card

Hello forum!

So this is what I plan to achieve using OF and I’m a little confused how to go about it.

I have a Focusrite Scarlett 2i2 sound card and I’d like to plug in an instrument to it -> grab all the buffer values of the audio coming in to do analysis and drive visuals -> send the same audio out through the sound cards outputs.

Any info on how to achieve this?

you should take a look at the audio input example in OF: OF/examples/sound/audioInputExample

to copy the microphone into the output you could use the ofSoundBuffer class (read the microphone buffer in the audioIn callback, write to output buffer in the audioOut callback). BUT: if you don’t manipulate the audio your sound card software can possibly mix the microphone directly back into the output (no need to do this in OF)