Making cool music visualizations

edited April 2017 in Library Questions

Hi everyone,

I am trying to create a project where there are visuals that move every time a certain range in the frequency spectrum is triggered. For example, every time the kick hits(in my song it is the range less than 120Hz), the 'object' moves. I am beginner so this would be of much help.

Thank you, Daniel.

Answers

  • The Minim library comes with a number of examples (under Analytics) that show off beat detection. Coupled with the Waveform formed by the sound (again, see the examples), you have enough sound-related data to do some visuals...

  • The examples is a great way to start. You need to also have a look at the minim library. Check the FFT section in the next two links:
    http://code.compartmental.net/tools/minim/quickstart/
    http://code.compartmental.net/minim/javadoc/

    Previous posts are also a good way to start:
    https://forum.processing.org/two/search?Search=fft
    https://forum.processing.org/two/search?Search=frequency

    Kf

  • edited April 2017

    float m = 0; import processing.sound.*; //import processing.sound.*; Amplitude amp; AudioIn in; SoundFile file; float s;

    void setup() { size(640, 360); background(25); file = new SoundFile(this,"Deep_House_Song.aif"); file.play(); // Create an Input stream which is routed into the Amplitude analyzer amp = new Amplitude(this); //in = new AudioIn(this, 0); //in.start(); amp.input(file); }

    void draw() { noStroke(); rectMode(CENTER); m = map(amp.analyze(),1,5,4,800); // m is the map of the amplitude s = map(amp.analyze(), 0,.5,0,360); colorMode(HSB,100,100,100); fill(s,100,100,100); rect(width/2,height/2,m,m); println(amp.analyze());

    }

    This is what I have so far where the visuals move based on the amplitude, but not the specific frequency I am looking for. I was trying to figure out the FFT function, but it is a bit challenging and I will keep looking into it. As of now, anything else I could add to this to make it more interesting? Thank you.

  • Please edit your post, select your code and hit ctrl+o to format your code. Make sure there is an empty line above and below your code.

    Kf

Sign In or Register to comment.