Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
int x = 0;
int y = 0;
import ddf.minim.*;
import ddf.minim.signals.*;
Minim minim;
AudioPlayer mySound;
void setup() {
size(800, 800);
background(#e7e7e7);
noStroke();
rectMode(CENTER);
minim = new Minim(this);
mySound = minim.loadFile("song1.mp3");
mySound.play();
}
int n=0;
void draw() {
for (int i = 0; i <=0; i++) {
translate(width/2, height/2);
fill(random(255), random(255), random(255));
rect(i, i, mySound.left.get(i)*600, mySound.left.get(i)*600);
}
}
@edmorais

This comment has been minimized.

Copy link

commented May 22, 2016

Ou:

// ...
AudioInput mySound;

void setup() {
  // manter o resto até à linha 14
  mySound = minim.getLineIn(minim.MONO, 1024);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.