Sound - issue with reverb and delay

I have some issues adding effects for a sound playback. When I run the code below without line 12 then the music plays fine. But if I add line 12 then the signal turn into mono and there is no reverb effect. The same happens for the delay effect. I get the following message in the console: ERROR: /synth/map/input: Audio input index 0 out of range for synth 2

import processing.sound.*;
SoundFile file;
Reverb reverb;

void setup() {
  println("start");
  reverb = new Reverb(this);
  file = new SoundFile(this, "1 A.mp3");
  file.play();
  println("SFDuration= " + file.duration() + " seconds");
  reverb.process(file);
}      

void draw() {
}

reverb.process() expects an AudioIn object as its first input, and you are giving it a SoundFile as input.

The AudioIn object uses the sound card output, so I think reberb expects an AudioIn object because it uses the sound card in some way to manipulate sound.

What you could do is to create both a SoundFile object and an AudioIn object, and play both (play the SoundFile first so the AudioIn can have it as an input) then use the AudioIn object as an input for reberb.process(). I think this would play your sound file in through the sound card and allow you to manipulate the sound card output.

import processing.sound.*;
SoundFile file;
AudioIn in;
Reverb reverb;

void setup() {
println("start");
reverb = new Reverb(this);
file = new SoundFile(this, "1 A.mp3");
in = new AudioIn(this, 0);
file.play();
in.play();
println("SFDuration= " + file.duration() + " seconds");
reverb.process(in, 1, 1, 1);
}

void draw() {
}

Try something like the code above, and see if the sound is modified by the reverb.