# Minim delay & other effects

**URL:** https://discourse.processing.org/t/minim-delay-other-effects/34707
**Category:** Libraries
**Created:** [January 18, 2022, 2:40am UTC](https://discourse.processing.org/t/minim-delay-other-effects/34707 "2022-01-18T02:40:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Froschgelb](https://avatars.discourse-cdn.com/v4/letter/f/97f17d/32.png) [@Froschgelb](https://discourse.processing.org/u/Froschgelb)
#### Post date: [January 18, 2022, 2:40am UTC](https://discourse.processing.org/t/minim-delay-other-effects/34707/1 "2022-01-18T02:40:01Z")

</div>

Hi there, I am writing a small program to record audio and apply some basic effects from the minim library, delay & flanger etc. I have implimented the record feature and it works fine however trying to patch effects is giving me trouble as I cant figure out what im patching through them. In the delay example for example, they patch an oscillator blip through the delay [myBlip.patch(myDelay).patch(out);] but since my audio is recorded already [as “myrecording.wav”] I cant figure out what way i can patch this through. do I patch in the input, the output or do i patch in the audio file after its been recorded/saved? If so how would I go about this?

---

<div class="post-metadata">

### Author: ![zqviel](https://avatars.discourse-cdn.com/v4/letter/z/f17d59/32.png) [@zqviel](https://discourse.processing.org/u/zqviel)
#### Post date: [June 25, 2022, 12:05am UTC](https://discourse.processing.org/t/minim-delay-other-effects/34707/2 "2022-06-25T00:05:45Z")

</div>

Hi i’m trying to do the same as you and i’m stuck with the same problem, did you find the way to solve it?

---

<div class="post-metadata">

### Author: ![robertesler](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@robertesler](https://discourse.processing.org/u/robertesler)
#### Post date: [June 25, 2022, 1:32am UTC](https://discourse.processing.org/t/minim-delay-other-effects/34707/3 "2022-06-25T01:32:53Z")

</div>

Hi @zqviel and @Froschgelb. You have to use the FilePlayer class: [Minim/FilePlayer.java at master · ddf/Minim (github.com)](https://github.com/ddf/Minim/blob/master/src/main/java/ddf/minim/ugens/FilePlayer.java)  
There is also an example here: [Minim/examples/Synthesis/filePlayerExample at master · ddf/Minim (github.com)](https://github.com/ddf/Minim/tree/master/examples/Synthesis/filePlayerExample)  
It works similar to the AudioPlayer, except it can patch its output to another UGen. Here is an example to get you started.

```auto
import ddf.minim.effects.*;
import ddf.minim.ugens.*;
import ddf.minim.spi.AudioRecordingStream;

Minim minim;
AudioRecordingStream audio;
Delay myDelay;
AudioOutput out;
FilePlayer groove;

void setup()
{
  size(512, 200);

  minim = new Minim(this);
  audio = minim.loadFileStream("groove.mp3");
  groove = new FilePlayer(audio);
  out = minim.getLineOut();
  myDelay = new Delay( 0.4, 0.5, true, true );
 
  groove.patch(myDelay).patch(out); 
}

void draw()
{
  background(0);
}

void keyPressed()
{
  if ( key == 'l' ) groove.loop();
}

```
