66
edits
Line 291: | Line 291: | ||
For my final project I wanted to explore the world of sound processing. I started to experiment with the visualization of sound (beat detection).And I got more and more interessted into this topic. The semester break gave me the final inspiration for my project. I created an interactive map which shows some clubs in Berlin. With this map you can find the perfect club for you and your music taste. I think that there has never been a map like this. It could be really helpful and people should start to develope those kind of maps for metropolises like Berlin, London or NewYork. | For my final project I wanted to explore the world of sound processing. I started to experiment with the visualization of sound (beat detection).And I got more and more interessted into this topic. The semester break gave me the final inspiration for my project. I created an interactive map which shows some clubs in Berlin. With this map you can find the perfect club for you and your music taste. I think that there has never been a map like this. It could be really helpful and people should start to develope those kind of maps for metropolises like Berlin, London or NewYork. | ||
[https://vimeo.com/161960707 Part 1 Beat Detection] | |||
[https://vimeo.com/161019179 Part | [https://vimeo.com/161019179 Part 2 - Interactive Club Map] | ||
Code: | Code Part 1: | ||
<source lang="java"> | |||
import ddf.minim.*; | |||
import ddf.minim.analysis.*; | |||
import ddf.minim.effects.*; | |||
import ddf.minim.signals.*; | |||
import ddf.minim.spi.*; | |||
import ddf.minim.ugens.*; | |||
import camera3D.*; | |||
import camera3D.generators.*; | |||
import camera3D.generators.util.*; | |||
Minim minim; | |||
AudioPlayer song; | |||
BeatDetect beat; | |||
float eRadius; | |||
PImage img; | |||
void setup() { | |||
size(500, 500, P3D); | |||
minim = new Minim(this); | |||
song = minim.loadFile("song.mp3", 2040); | |||
song.play(); | |||
beat = new BeatDetect(); | |||
rectMode(CENTER); | |||
eRadius = 20; | |||
} | |||
void draw() { | |||
background(0); | |||
beat.detect(song.mix); | |||
fill( random(255), random(255), random(255), random(255)); | |||
int x = int(random(100, width - 100)); | |||
int y = int(random(100, height -100)); | |||
if (beat.isOnset() ) | |||
rect(250, 250, random(width), random(height)); | |||
} | |||
void mousePressed() { | |||
minim.stop(); | |||
song.close(); | |||
} | |||
void keyPressed() | |||
{ | |||
if ( key == '1') { | |||
minim = new Minim(this); | |||
song = minim.loadFile("song.mp3", 2040); | |||
song.play(); | |||
} | |||
if ( key == '2') { | |||
minim = new Minim(this); | |||
song = minim.loadFile("song-2.mp3", 2040); | |||
song.play(); | |||
} | |||
if ( key == '3') { | |||
minim = new Minim(this); | |||
song = minim.loadFile("song-3.mp3", 2040); | |||
song.play(); | |||
} | |||
if ( key == '4') { | |||
minim = new Minim(this); | |||
song = minim.loadFile("song-4.mp3", 2040); | |||
song.play(); | |||
} | |||
if ( key == '5') { | |||
minim = new Minim(this); | |||
song = minim.loadFile("song-5.mp3", 2040); | |||
song.play(); | |||
} | |||
if ( key == 'x') { | |||
song.close(); | |||
minim.stop(); | |||
} | |||
} | |||
</source> | |||
Code Part 2: | |||
<source lang="java"> | <source lang="java"> |
edits