Help us understand the problem. What is going on with this article?

プロセシングで、音楽に合わせてpointを動かす

More than 1 year has passed since last update.

音の波形を円状にして表示します。
音の波形の参考にさせてもらったサイトとpointを円状に作るために参考にさせてもらったサイトが次の2つです。

サウンドの基本(minimライブラリの使用)
http://r-dimension.xsrv.jp/classes_j/minim/

アニメーション(その2) 振動と回転
http://www.cp.cmc.osaka-u.ac.jp/~kikuchi/kougi/simulation2009/processing8.html

import ddf.minim.*;

Minim minim = new Minim(this);
AudioPlayer Player;

int wave = 100;

//cercle
float theta = 100; 
float x, y;
float r;

void setup(){
  size(400,400);
  Player = minim.loadFile("groove.mp3", 512);
  Player.play();

}

void draw(){
  background(255);
  translate(width/2, height/2);

  for(int i= 0; i < Player.left.size()-1; i++){
  //theta += 0.1 ;
  r = Player.left.get(i)*1000;
  x = r*cos(i*10);
  y = r*sin(i*10);
  point(x,y);  
  //line(0,0, x,y);
   }
}

void stop()
{
  Player.close(); 
  minim.stop();
  super.stop();
}
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away