17 Audio

17 Audio

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Using Minim to play a mp3 // this loads mysong.mp3 from the data folder // song = minim.loadFile("mysong.mp3"); song song.play(); song.play(); void draw(){} //empty for now void void stop() void { song.close(); song.close(); minim.stop(); minim.stop(); super.stop(); super.stop(); } 13 Using Minim to get to the Sound Buffer To allow for stereo, there are two buffers, song.left and song.right song.left and We could make a very simple visualizer by using the first value in the left buffer to change the size of an ellipse like: void draw() { backgroun...
View Full Document

This note was uploaded on 01/13/2012 for the course CS 12 taught by Professor Ma during the Spring '08 term at UC Davis.

Ask a homework question - tutors are online