Audio visualizer

Audio visualizer with OpenFrameworks from Régis Frias on Vimeo.

Inspiration (Magnetosphere, by Robert Hodgin):

https://vimeo.com/8581392

I believe this was not supposed to be a tutorial or anything, but some people were curious to know how I did this exercise. Here’s how:

I started this sketch in order to study some behaviors I’ve seen on Robert Hodgin’s work (see video above). The idea was not so much to copy but to try to practice the skills necessary to achieve a specific result. In this case using a mathematical formula to place points around a sphere (check this nerdy post for more details — that is, if you can handle :D ):

The basic formula for the sphere in computer parlance looks like this:

x = cos( separationAngle * 2 * (PI/180) * theta) * sin( separationAngle * (PI/180) * fi ) * radius;
y = sin( separationAngle * 2 * (PI/180) * theta) * sin( separationAngle * (PI/180) * fi ) * radius;
z = cos( separationAngle * (PI/180) * fi ) * radius;

separationAngle is the angle between 2 successive points (360/numberOfPoints; more points => smaller angle
PI/180 converts degrees to radians (case you’re wondering)

For simplicity’s sake I started with the two-dimensional version of the problem, a circle:

I created a Processing sketch to illustrate this (code for this is given at the bottom of the post):

Next step was to make each point float in an interesting way. This was achieved by adding a value to the radius, relative to the position of the point in the sphere and a variation to the separationAngle:

x = cos(theta*(separationAngle + ang)*(PI/180)) * sin(fi*((separationAngle + ang)/2)*(PI/180)) * (radius + radVariation);
y = sin(theta*(separationAngle + ang)*(PI/180)) * sin(fi*((separationAngle + ang)/2)*(PI/180)) * (radius + radVariation);
z = cos(fi*((separationAngle + ang)/2)*(PI/180)) * (radius + radVariation);

ang ads some randomness to the separationAngle at the hit of UP or DOWN keyboard keys
radVariation is the radius variation at each point and is =

cos( 1 * (PI/180) + (theta/4 + waveTravel) ) *
sin( 1 * (PI/180) + (fi/4 + waveTravel) ) *
spread/5 + spread/5;

spread is the amount of variation added to the radius at each point. it gets a boost every time the mouse is pressed or some loudness is detected in the input

And that’s about it for now!

================================================

Processing version (you should be able to run this on your Processing-ready computer; it also works in JS mode \o/ — bless these nerds, also you may recognize some variable names from this nice fellow’s post from elsewhere):

int bgcolor = 255;
int numParticles = 300;
float radius;
float speed;
float angSpeed;
float gravity;
float friction;
float spread;
float angRand[] = new float[numParticles];
void setup(){
 background(bgcolor);
 size(700, 500);
 radius = height/5;

 speed = 0;
 angSpeed = 0;
 gravity = 0.00001;
 friction = .9999;
 spread = 100;
for(int i = 0; i < numParticles; i++){
 angRand[i] = random(-180, 180);
 }
}
void draw(){
 background(bgcolor);

 translate(width/2, height/2);

 for(int i = 0; i < numParticles; i++){
 float radiusIncr = spread * (angRand[i]+200)/180;

 float x = cos(radians(360/numParticles * (i) + angRand[i] + (frameCount/500 + angSpeed)*i)) * (radius + radiusIncr);
 float y = sin(radians(360/numParticles * (i) + angRand[i] + (frameCount/500 + angSpeed)*i)) * (radius + radiusIncr);

 float x2 = cos(radians(360/numParticles * (i) + angRand[i]/2 )) * (radius - radiusIncr);
 float y2 = sin(radians(360/numParticles * (i) + angRand[i]/2 )) * (radius - radiusIncr);

 // Accelerate (change speed) by gravity
 speed += gravity;
 // Move by speed
 spread -= speed;

 // Bounce off Circle
 if (spread <= 0){
 spread = 0;
 // Reverse direction
 speed *= -1;
 }
 speed *= friction;

 angSpeed += gravity;
 angSpeed *= friction;

 stroke(0, 20);
 line(x, y, 0, 0);
 noStroke();
 fill(0, constrain(255 - radiusIncr, 0, 150) );
 ellipse(x, y, 5, 5);
 }
}
void mousePressed(){
 speed -= .1;
 angSpeed -= 2;
}
Posted in Multimedia Authoring 2013-12, openFrameworks, Processing | 1 Comment

Tips for creating oF apps

This link has good tips for creating final apps for distribution with openFrameworks:
http://nickhardeman.com/506/stand-alone-application-in-openframeworks/

Posted in Multimedia Authoring 2013-12, openFrameworks | Leave a comment

XCode 5, oF add-ons and “tr1” problem

If you’re trying to install oF add-ons and getting an error “tr1 memory”, you will need to change the SDK of your project file, and the openFrameworks project file, to 10.8, as in the images below.

Posted in Multimedia Authoring 2013-12, openFrameworks | Leave a comment

Processing tutorials by Daniel Shiffman

Introductory Processing tutorials, nicely executed on the browser (via Forrest Oliphant):
http://hello.processing.org/

Posted in Processing | Leave a comment

Multimedia Authoring: project proposals

On 10/12, we will have our project concept presentation.

The project can be any application that involves the combination of different media with code. It should be interactive and/or generative. Particular attention should be paid to the combination of multiple media. Real-time audiovisuals are the main suggested topic, but other topics are possible.

The preferred programming environment for the projects is openFrameworks, and this will be the one I will mostly give support to. However, you can use any other programming environment, as long as it matches the level of complexity we approached in class.

Please present your concepts by posting to this blog, before 10/12. Use the name of your project as title. In case you prefer to post the concepts somewhere else, simply post the link to the blog. Please add in the post:

  • at least one image (it can be a sketch) or video of your project
  • a paragraph (or more) about the project
  • a link to or video embed of at least one related project that you find inspiring

Days 11 and 12/12 will be dedicated to development, debugging and tutoring. The final projects will be presented on 13/12. For that date, please:

  • update your blog post
  • provide a ~20 second video screen capture of your project (720p)

Additional references/inspiration:
http://www.creativeapplications.net
http://createdigitalmotion.com
http://thecreatorsproject.com
http://vimeo.com/channels/audiovisions
Audio-Visions YouTube playlist

Posted in Multimedia Authoring 2013-12 | Leave a comment

Multimedia Authoring: Nov-Dec/2013

The course is focused on the generative aspects of multimedia design and the authoring process, interaction design and the control of media elements in interactive projects. Students will experiment with a broad range of media elements with an emphasis on controlling media behavior through code.

Special emphasis will be given to crossings between sound and image: live visuals; sound visualisation; sonification; VJing; audiovisual composition; live cinema; visual music; etc.

The main development environment for the course will be openFrameworks (http://www.openframeworks.cc/), although other environments will be explored. Students should have previously attended the Software Studies for Media Designers course, or demonstrate having acquired equivalent skills. Students are required to plan, develop, document and present a project at the end of the course.

Recommended bibliography:
Noble, J., 2012. Programming Interactivity: A Designer’s Guide to Processing, Arduino, and openframeworks (2nd Edition), O’Reilly Media.

26th Nov 2013 9:00 – 12:00 : Introduction to openFrameworks, C++ and Xcode
27th Nov 2013 9:00 – 12:00 : Generative graphics
28th Nov 2013 9:00 – 12:00 : Animation and physics
29th Nov 2013 9:00 – 12:00 : Particle systems
3rd Dec 2013 9:00 – 12:00 : Image processing and video
4th Dec 2013 9:00 – 12:00 : Audio processing
5th Dec 2013 9:00 – 12:00 : Audio-visuals and sound visualisation
10th Dec 2013 9:00 – 12:00 : Project proposal presentation
11th Dec 2013 9:00 – 12:00 : Project development
12th Dec 2013 9:00 – 12:00 : Project development
13th Dec 2013 9:00 – 12:00 : Project presentation

Classes are on the 4th floor, computer room.

Course files are available under “Course files” in the above menu > course_2013_MMA_B

Posted in Multimedia Authoring 2013-12 | Leave a comment

Presentation to new Media Lab Helsinki students, 23/8/2013

Background:
management, art [comics, theatre, music], coding, interaction design [freelance / agency]
What I currently do/teach/research:
audiovisuals, music, mobile development, interaction design, media management
Examples:
Video Jack, Interactive Audiovisual Objects, PESI, AVVX, AppCampus, Baltic Diving Co.

Teaching (check Oodi/Noppa):
25397 Software Studies for Media Designers 29.10.13 -15.11.13
25143 Multimedia Authoring 26.11.13-13.12.13
25454 Multitouch Interaction 25.02.14-14.03.14

More info soon:
25469 Art, Technology and Business (Tuesdays afternoon, all 2014)
Content, Business and Technology minor study
AVVX workshop in 1st quarter of 2014
25356 Information Visualisation and Design 25.03.14-11-04.14

Links:
http://softwarestudies.mlog.taik.fi
http://www.nunocorreia.com
http://vimeo.com/nunocorreia

Posted in Uncategorized | Leave a comment

Information Visualization Design: Augmented Reality – Documentation

Video and photos from the Information Visualization Design course – Augmented Reality module (taught by Lily Diaz and Nuno Correia):


IMG_2528 IMG_2529 IMG_2532 IMG_2534 IMG_2536 IMG_2543 IMG_2544 IMG_2545 IMG_2546 IMG_2551

Thank you to all course participants.

Posted in Information Visualization Design 2013 | Leave a comment

Visuals to Audio Submission

Here is the video for the final stage of the Visuals to Audio app that I was able to achieve within the time constraints of the course. There are two ways to change the sound output of this app — by filtering the visual data (one example implemented is thresholding) or by tweaking the waveform (one example implemented is switching between sine and sawtooth). Future plans for extending this include more preset filters for the visuals, and more waveforms. Another enhancement would be in-built window management, as now every new window needs to be a separate copy of the app.

Posted in Multimedia Authoring 2013-04 | Leave a comment

Visuals to Audio

I’ve always been curious about translation — how an artifact in one medium can be translated into another medium. For this project, I wanted to translate visuals into sound.

Inspiration and code bases for the project can be found at the following links:

These will form the basis of my proposed programme.

Screen Capture to Sound by Satoru Higa

Posted in Multimedia Authoring 2013-04 | Leave a comment