# Minim — getLineIn

**URL:** https://discourse.processing.org/t/minim-getlinein/10801
**Category:** Libraries
**Created:** [May 1, 2019, 7:46am UTC](https://discourse.processing.org/t/minim-getlinein/10801 "2019-05-01T07:46:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lnp](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lnp/32/4911_2.png) [@lnp](https://discourse.processing.org/u/lnp)
#### Post date: [May 1, 2019, 7:46am UTC](https://discourse.processing.org/t/minim-getlinein/10801/1 "2019-05-01T07:46:49Z")

</div>

Hello Preeps!

Loving Minim. What a great library! I have no problem reading an mp3 or getting a simple getLineIn() input from the microphone on my mac. All those tests work and my sketch reacts accordingly. My issue now is how do I get live input from a PC without a microphone? Kind of critical bug now 😑 I thought `getLineIn(Minim.STEREO)` would solve this problem. Ie. it reads whatever’s happening on the active soundcard. Nothing’s going on. No input seemingly.

I’ve seen Jack or SoundFlower be mentioned in previous conversations for _setting_ the input source but I still find this unclear with regards to minim. Would Jack be defining the active source for Minim.STEREO?

Just got a bit of context I’m working with a musician/artist who will be playing my sketch during a live performance. Just for context the sketch is funneled through Spout in to TouchDesigner. That all works. I can see in TouchDesigner the music’s all streaming in from whatever he’s playing on the various bits of hardware.

Any help MUCHLY appreciated!

If you’re interested some of the prototypes of the visuals here: [https://www.instagram.com/n\_a\_n\_co/](https://www.instagram.com/n_a_n_co/)

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [May 1, 2019, 8:21am UTC](https://discourse.processing.org/t/minim-getlinein/10801/2 "2019-05-01T08:21:49Z")

</div>

i try that recorder on a win7 PC to record YouTube video sound  
( no micro, also play audio jack [http://jackaudio.org/downloads/](http://jackaudio.org/downloads/) )

```auto

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

Minim minim;
AudioInput in;
AudioRecorder recorder;

void setup() {
  size(512, 200, P3D);
  minim = new Minim(this);
  in = minim.getLineIn();
  recorder = minim.createRecorder(in, outfile);
  textFont(createFont("Arial", 12));
  println("use key: [r] [r] [s]");
}

void draw() {
  background(0); 
  stroke(255);
  for(int i = 0; i < in.bufferSize() - 1; i++) {
    line(i, 50 + in.left.get(i)*50, i+1, 50 + in.left.get(i+1)*50);
    line(i, 150 + in.right.get(i)*50, i+1, 150 + in.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' ) {
    recorder.save();
    println("Done saving: "+outfile);
  }
}

```

---

<div class="post-metadata">

### Author: ![lnp](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lnp/32/4911_2.png) [@lnp](https://discourse.processing.org/u/lnp)
#### Post date: [May 1, 2019, 9:22am UTC](https://discourse.processing.org/t/minim-getlinein/10801/3 "2019-05-01T09:22:41Z")

</div>

Hey - thanks for that. Cool sketch! Saved out me whistling in to the microphone. Funny.

I tried with Jack but I couldn’t work out the settings. Works with SoundFlower on my mac pretty easily. Very cool. Thanks for the prod.

Any tips for setting it up with Jack? My Jack youtube quest begins…
