Global Communications > Development Media

Trent's Bio and Reflection

<< < (9/16) > >>

mbsurfer:
I see in your code from the video you imported the libraries:
--- Code: ---
import processing.opengl.*;
import processing.serial.*;
--- End code ---

Then you assigned 'arduino' to communicate with the Firmata process library:

--- Code: ---
Arduino arduino; // Setup an arduino object to communicate with Firmata firmware

...

arduino = new Arduino(this, Arduino.list()[1], 115200);
--- End code ---


Then I'm assuming, during the setup it's reading an mp3 from some output pin (that I can't find) at this part:

--- Code: ---
if(mp3) {
song = minim.loadFile("song.mp3", 128);
beat2.detect(song.mix);
song.play();
fft = new FFT(song.bufferSize(), song.sampleRate()); }
else{
in = minim.getLineIn(Minim.STEREO, 1024);
beat2.detect(in.mix);
fft = new FFT(in.bufferSize(), in.sampleRate());
}
--- End code ---

So is this process code that you're talking about already implemented? If so, what do you mean by the output pin from the computer is the audio output the arduino would read? Which pin are you talking about? And how would it connect, by just a jumper cable?

basstronix:
That is very very old code, haha. Procssing loads an mp3 off the hard drive. It also looks at the Line In with in = minim.getLineIn. Basically I have two audio sources available to the program; the MP3 and the system's audio output (set in windows recording devices to Stereo Out). A fourier transform is then performed, converting the signal to frequency information. The information is stored in a vector in the form of the intensity each frequency band.

Firmata gives you direct control of the arduino live from your computer. arduino.analogWrite(pin, value) will give a pin a value.

r = 9;  //stores the value of our Red output pin (must be PWM!)

bass = in.getfft(0);  //not actual command, forgot what it is

arduino.analogWrite(r, bass);

This outputs red light according the first stored frequency band, which is of course very low bass. This usually needs to be amplified. I generally multiply my frequency variables by an exponential function to expand the lows and condense the highs for a more reactive light show. You may also want to apply a low pass filter so that you don't end up with seizure inducing light shows.

basstronix:
I'm getting a ridiculous amount of requests from big DJs and producers that want to be a part of this game. I think our soundtrack is going to break records...


:)

Jonathon [SSL]:
That's great, because one of the most awesome aspects of GE64 was the music. For most mods, custom music is either fairly poor or nonexistent... by comparison we have a multiple hour soundtrack by a bunch of extremely talented composers and can always use more.

Emilia:
I would really love for the GES soundtrack to grow. If we could have some awesome remixes, that would be great too.

But your music will always be my favourite, Bass

:P

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version