Hi everyone. I was hoping to get some help with my code please. I'm a fairly new user to processing and don't just want the answer straight forward; i would like this to be a learning process as much as an answer to the question. Ive been trying to mash up some bits of code ive found online and in the libraries. Here's the gist of what i'm trying to do. A user speaks into a microphone. This audio is fed into processing and the audio is converted and output on a screen in another room as sound waves. This part I have down pretty well (I still haven't figured out how to assign a color range to the sound waves yet...). The second part of the equation here is that the sound input will then be played in a third room as a live (or as close to it as possible) feed. I would like the audio output into room #3 to be distorted so as to maintain the anonymity of the original user, in room #1. If anyone could help me figure out how to do this second part of taking the live audio in, distorting it, then playing it elsewhere 'live' that would be incredible. Here is what i've got so far.
Thanks a million.
Evan
Columbia GSAPP
import ddf.minim.*;
Minim minim;
AudioInput in;
AudioRecorder recorder;
int x = 30;
PFont fontA;
void setup()
{
size(1000, 800, P2D);
textMode(SCREEN);
minim = new Minim(this);
minim.debugOn();
// get a stereo line-in: sample buffer length of 2048
// default sample rate is 44100, default bit depth is 16
in = minim.getLineIn(Minim.STEREO, 1000);
// create a recorder that will record from the input to the filename specified, using buffered recording
// buffered recording means that all captured audio will be written into a sample buffer
// then when save() is called, the contents of the buffer will actually be written to a file
// the file will be located in the sketch's root folder.
I'm sitting here with my processing book cracked open and have been scanning the forums for a few hours trying to sort this out. Ive taken the "recordlinein" minim example and have began hacking it up to suit my needs. Essentially what I would like to do is assign a color range to the lines that are drawn as a result of the audio input so that, for example, when there is little noise activity, lines are within the blue-green range, and when there is a lot of activity they are red, orange, etc. I'm pretty new to processing so any insight is greatly appreciated. Code is below.
Thanks,
Evan
Columbia GSAPP
* This sketch demonstrates how to an <code>AudioRecorder</code>
* to record audio to disk. To use this sketch you need to have
* something plugged into the line-in on your computer. Press 'r'
* to toggle recording on and off and the press 's' to save to disk.
* The recorded file will be placed in the sketch folder of
* the sketch.
*/
import ddf.minim.*;
Minim minim;
AudioInput in;
AudioRecorder recorder;
void setup()
{
size(1000, 800, P2D);
textMode(SCREEN);
minim = new Minim(this);
minim.debugOn();
// get a stereo line-in: sample buffer length of 2048
// default sample rate is 44100, default bit depth is 16
in = minim.getLineIn(Minim.STEREO, 1000);
// create a recorder that will record from the input to the filename specified, using buffered recording
// buffered recording means that all captured audio will be written into a sample buffer
// then when save() is called, the contents of the buffer will actually be written to a file
// the file will be located in the sketch's root folder.