環境/macOS Montery Apple Silicon Mac

ジェネラティブ・アート、サウンドビジュアライズ。楽譜のように音をシートに記録する作品です。

Processing にて制作。コードは至ってシンプル。Sound Library のFFT(高速フーリエ変換)を利用してランダムなウェイトの点を描画していきます。

Generative art, sound visualization. The art of recording sounds in musical notation.

It was created on Processing. The source code is very simple and uses the FFT (Fast Fourier Transform) of the sound library to draw random dots.

Sample

<Source code>
“sample.wav”には、自身のサウンドデータを記載してください。サウンドデータは、Processingエディターにドラッグ&ドロップするだけで、dataフォルダが制作され利用することができます。
Please write your own sound data in “sample.wav”.
Your sound data can be simply dragged and dropped into the Processing Editor, where a data folder is created and ready for use.


//sound
import processing.sound.*;
SoundFile soundfile;
FFT fft;

int bands = 32; //(8,16,32,64,128,256,512,1024)
float margin = 100;
float stepNum;
float stepPlus;

void setup(){
  background(0);
  size(1200,1200);
  frameRate(8);

  //sound
  soundfile = new SoundFile(this, "sample.wav"); //(60*8)
  soundfile.play();

  //analyze
  fft.analyze();
  stepNum = (width-margin*2)/bands;
  stepPlus = (width-margin*2)/(60*8); //second framecount
}

void draw(){
  //background(0);
  //noStroke();
  //fill(0,30);
  //rect(0,0,width,height);

  stroke(255,70);
  smooth();
  noFill();
  fft.analyze();

  if (stepNum < width - margin*2){
    for(int i=0; i < bands; ++i){
      strokeWeight(fft.spectrum[i]*50+1);
      for (float j = 0; j < 10; ++j) {
        float ali = random(360);
        float ran = (fft.spectrum[i]*width/5+1) * (1 - random(random(random(1))));
        point(cos(ali)*ran+stepNum+margin, sin(ali)*ran+i*(height-margin*2)/float(bands)+margin);
      }
    }
  } 
  stepNum += stepPlus;
}

barbe_generative_library

Processing 参考書籍
[Book] 数学から創るジェネラティブアート – Processingで学ぶかたちのデザイン

mathmade-processing_gizyu-image

初版/ 2019.4.17
ページ数/304ページ
出版社/技術評論社
言語/日本語

【Amazon.co.jp で購入】

ーーーーー
”Books”では、”barbe_generative_Library”として、
barbe_generative_diary の創作において実際に購入し、読んだ本を紹介します。

ーーーーー