Regarding using AudioInput in Minim

I am trying to create Reverb and echo to the audio that is coming in through the computer mike but thr is nothing in the Minim library to let me do that.Can somebody help me in this regard
Or shuld I use LiveInput instead of AudioInput but while using LiveInput the sound that I am hearing is nothing but some racked noises.Do any body has a clue like how I can create realttime echo through AudioInput or LiveInput.
I am using the put down in the minim documentation
Please help

have a look at the : processing.sound.*; library


Here the delay:

Here the audio in


but can I not use the Minim library to create reverb and echo?
I have used delay in the AudioPlayer and works perfectly well but cannot patch it with AudioInput.
Though I did patch it with LiveInput but the live input gives some smuttering sounds

looks like there is a trick connect input to output

like i play here ( but not tested with micro )

  * 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, 
  * or else be working on a laptop with an active built-in microphone. 
  * <p>
  * 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.
  * <p>
  * For more information about Minim and additional features, 
  * visit

String outfile = "data/myrecording.wav";  // minim need you to create the /data/ dir manually
import ddf.minim.*;
import ddf.minim.ugens.*;
import ddf.minim.spi.*; // for AudioStream

Minim minim;
//AudioInput in;
LiveInput in;
AudioOutput out;
AudioRecorder recorder;
//Delay myDelay;

void setup() {
  size(512, 200, P3D);
  minim = new Minim(this);
//  myDelay = new Delay( 0.4, 0.5, true, true );
  textFont(createFont("Arial", 12));
  println("use key: [r] [r] [s]");
  out = minim.getLineOut();
  AudioStream inputStream = minim.getInputStream( out.getFormat().getChannels(), 
  in = new LiveInput( inputStream );
//  in.patch( myDelay).patch(out);
  recorder = minim.createRecorder(out, outfile);

void draw() {
  for(int i = 0; i < out.bufferSize() - 1; i++)  {
    line(i, 50 + out.left.get(i)*50, i+1, 50 + out.left.get(i+1)*50);
    line(i, 150 + out.right.get(i)*50, i+1, 150 + out.right.get(i+1)*50);
  if ( recorder.isRecording() )    text("Currently recording...", 5, 15);
  else                             text("Not recording.", 5, 15);

void keyReleased()
  if ( key == 'r' )   {
    if ( recorder.isRecording() ) recorder.endRecord();
    else                          recorder.beginRecord();
  if ( key == 's' )  {;
    println("Done saving: "+outfile);

but can I not use the Minim library to create reverb and echo?

to make a reverb it sounds lika a challenge.

What kind of algorithm do you have in mind ?

for instance,a simple Schroeder’s algorithm, without allpass filters and combfilters it’s not possible to be implemented, and in Minim I can’t find any allpass and probably will not be so simple to make a combfilter using delays as well …

an example of an implementation, and it’s MONO, to make it stero you need more filters …

if you really want to make your own reverb, you should use SuperCollider,
at least there, you don’t have to deal with some strange way to design filters …

The next example is by James McCartney. It comes from the 01 Why SuperCollider document that was part of the SuperCollider2 distribution.

The example is more or less a Schroeder reverb - a signal passed through a parallel bank of comb filters which then pass through a series of allpass filters.
var s, z, y;
    // 10 voices of a random sine percussion sound :
s =, {, 50), 200 + 3000.0.rand, 0.003)}) );
    // reverb predelay time :
z =, 0.048);
    // 7 length modulated comb delays in parallel :
y =,{, 0.1,, 0.04, 0.05), 15) }));
    // two parallel chains of 4 allpass delays (8 total) :{ y =, 0.050, [0.050.rand, 0.050.rand], 1) });
    // add original sound to reverb and play it :


Minim has had a reverb ugen listed as a potential future feature since at least 2011. I don’t think it has ever happened, so you need to either use Processing Sound or roll your own. Searching the minim source for reverb finds a single reference in a low level javasound component.

1 Like