Report as inappropriate.
This scenario is an extension of the one from the book:
"Introduction to Programming with Greenfoot"
by Michael Kolling
The book example shows a piano on screen that players can play with their
keyboard. It uses pre-made sound files for every piano key.
This extension is a music visualizer that creates imagery based on music played
on the piano keys. The Visualizer class controls the imagery displayed. The
Oval class is a shape class that gets displayed to create the imagery.
You can easily extend this project and here are some suggestions:
1. Change the background color of the Visualizer screen.
2. Add more and different shape classes.
3. Move the shapes by adding code to the act() method.
4. Arrange shapes in different patterns like lines, circles, flowers, etc.
5. Fade or intensify colors by adjusting transparency.
6. Have shapes disappear after some time or when moving off the screen.
Note that some drawing can be done directly on the Visualizer screen though
this usually makes animation more difficult.
Want to leave a comment? You must first log in.
No votes yet.