Music Player Greenfoot Tutorial


Important!!  This tutorial is out of date.  As of Greenfoot 2.0, wav, mp3, and midi support are built in.  These classes also do not work on any system, such as Ubuntu, which have control of the system's mixer, since these classes need control of the system's mixer.  This website will be coming down soon.

This is a 2 part tutorial. The goals of this tutorial are to learn how to play background music with greenfoot using my WavPlayer or MidiPlayer classes.

I am assuming for this tutorial some knowledge of Greenfoot and Java.  One should be familiar with Java syntax and have access to the Greenfoot API documentation. If after running the applets at the bottom of the page you do not have sound on the videos, restart your browser or download the videos and play them in a program external to your browser (e.g. QuickTime). This may happen because the sound resources may not be available immediately after freeing them in the applets.



This player demonstrates my WavPlayer class. Click blue to load a sound file. Click green to play it. Click red to stop.


Your browser is ignoring the <APPLET> tag!
Made with Greenfoot - www.greenfoot.org

This player demonstrates my MidiPlayer class. Click blue to load a sound file. Click green to play it. Click red to stop.


Your browser is ignoring the <APPLET> tag!
Made with Greenfoot - www.greenfoot.org

Tutorials

Home


Email meBack